redux_persist_flutter pub package

Flutter Storage Engine for redux_persist.

Can either save to shared_preferences (default, recommended), or your application document directory.


final persistor = Persistor<State>(
  // ...
  storage: FlutterStorage("my-app"),


If you want to wait until rendering you app until the state is loaded, use the PersistorGate:

Widget build(BuildContext context) {
  return PersistorGate(
    persistor: persistor,
    builder: (context) => MyApp(),

If you want to display a loading/slash screen while loading, pass a widget to render to the loading param of PersistorGate:

  persistor: persistor,
  loading: SlashScreen(), // !!!
  builder: (context) => MyApp(),


By default, it saves to FlutterSaveLocation.documentFile (application document directory, recommended).

You can also save to your shared preferences by using FlutterSaveLocation.sharedPreferences:

// Use shared preferences
FlutterStorage("my-app", location: FlutterSaveLocation.sharedPreferences)

Features and bugs

Please file feature requests and bugs at the issue tracker.