8. Data Persistence | Shared Preferences in Flutter | Module 13 Part 1 | Flutter App Development

preview_player
Показать описание
In order to avoid frustrating users, your app needs to save data that survives an app restart. Saving app data to some type of storage that survives app restarts is called data persistence.

We can use 3 approaches to persist data in flutter
1. Persist data with SQLite
2. Read and write files
3. Store key-value data on disk

There’s multiple ways to store data in disk. For instance, one of them is using a key-value store. Accordingly, iOS and Android has native solutions for doing key-value storage in disk. Specifically, iOS has UserDefaults and Android has SharedPreferences. Instead of manually using each of them, you can use an existing Flutter package called shared_preferences that uses the appropriate one depending on the platform on which you are running.
Рекомендации по теме
welcome to shbcf.ru