In this course you’ve seen several local data storage methods in action, and used SharedPreferences, Flutter Secure Storage, and File storage techniques. For each of these technologies you have created helper classes designed to read and write data from the example app.
First you have seen SharedPreferences. This is an ideal storage method for small pieces of data, like user preferences. You’ve seen how to set and retrieving several data types, like integers, strings, and booleans.
You have also seen how to manage more complex data by serializing objects into JSON strings.
Serialization is the process of converting complex data structures (like Maps or objects) into a format (like a string) that can be easily stored. The opposite is deserialization, where you convert the serialized data back into its original form. You’ve seen both during this course: they are very common tasks that you’ll probably use very often in your Flutter apps when dealing with storage in any form.
Then you’ve used Flutter Secure Storage, where data is stored with encryption, offering a higher level of security than unencrypted tools. You’ve seen how to read and write data from FlutterSecureStorage and use it in an app.
Finally you’ve seen how to store files locally. You’ve seen how you can read and write files in the app’s documents directory, and seen how “File” objects work.
You have created, retrieved and deleted files within the app’s documents directory, and retrieved information about the file itself, like the creation date, it’s the full path, and permissions.
Throughout the course, we’ve used the Singleton pattern for the helper classes, ensuring that only one instance of the class exists in the application.
By now you should have gained a good understanding of ways to store data locally in a Flutter app, and I hope you have the tools to choose the best storage solution for your next great app!
I truly hope you enjoyed this course. See you next time, and meanwhile, keep coding!