Aplikacje często muszą przechowywać dane lokalnie na urządzeniu — preferencje użytkownika, dane z pamięci podręcznej, treść offline. Flutter oferuje kilka opcji — shared_preferences (klucz-wartość), SQLite (relacyjna) i inne — każda dostosowana do różnych potrzeb.
Opcje przechowywania lokalnego
SHARED_PREFERENCES → simple KEY-VALUE storage (settings, flags, small data):
→ store primitives (strings, ints, bools) — like a simple persistent map
→ for: user preferences, tokens, simple flags (NOT large/structured data)
SQLITE (sqflite) → a full relational DATABASE on the device:
→ tables, SQL queries — for STRUCTURED, larger data; complex queries; relationships
HIVE / ISAR → fast NoSQL local databases (key-value/object stores) — popular, fast,
Dart-native (no SQL); good for structured local data
FILE storage → read/write files directly (path_provider for directories)
SECURE storage → flutter_secure_storage for SENSITIVE data (tokens, credentials) —
encrypted (keychain/keystore)
