Flutter Storage Engine for
final persistor = Persistor<State>( // ... storage: FlutterStorage(), );
It is recommended to load initial state before calling
runApp to let Flutter
show the slash screen until we are ready to render.
By default, it saves to
(application document directory, recommended).
You can also save to your shared preferences by using
// Use shared preferences FlutterStorage(location: FlutterSaveLocation.sharedPreferences); // Use document file FlutterStorage(location: FlutterSaveLocation.documentFile);
You can pass a
key argument to
FlutterStorage to provide a key
for the file name (document file) or the shared preference key.
Features and bugs
Please file feature requests and bugs at the issue tracker.
- Foreign Function Interface for interoperability with the C programming language. [...]
- HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
- Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.