

Time length already played in an audio or video fileĪny customization that makes the user do less work the next time they use your app is a good candidate for shared preferences.Some data may not have been explicitly chosen by the user, but is still important to save. Here are some examples of things you might save using shared preferences: When you have small amounts of data that you want to persist across app runs, you can use Flutter’s shared_preferences plugin to save that data. From there you’ll be able to experiment and adapt them to your own needs.

I’ll give you cut-and-paste code blocks for you to try out.

Have the Flutter development environment set up (This tutorial was tested with Flutter 1.0.).We’ll look at each one of these and go through some easy examples to help us understand them. Specifically, we’ll learn how to save data using the following methods: Flutter makes these options available to us, too. Both Android and iOS give us several options for how to save data locally. It’s a rare app that doesn’t need to store some sort of data, whether it’s remembering the last article read, the user’s email address, or the night mode setting. You will need a Flutter development environment set up, and should have some basic knowledge of Flutter.
