PersistedStoreProvider<S> constructor

const PersistedStoreProvider<S>(
  1. {Key key,
  2. @required Create<Store<S>> initialStore,
  3. @required Persistence<S> persistence,
  4. @required WidgetBuilder restoredbuilder,
  5. @required WidgetBuilder restoringBuilder,
  6. Duration debouncing = const Duration(milliseconds: 500),
  7. PersistedStoreInitializer<S> storeInitializer}

Creates a StoreProvider instance and exposes both the Store and its Store.state using provider.

DON'T use this with an existing Store instance, as removing the provider from the widget tree will dispose the Store.
Instead consider using StateNotifierBuilder.

create cannot be null.


const PersistedStoreProvider({
  Key key,
  @required this.initialStore,
  @required this.persistence,
  @required this.restoredbuilder,
  @required this.restoringBuilder,
  this.debouncing = const Duration(milliseconds: 500),
})  : assert(initialStore != null),
      assert(persistence != null),
      assert(restoredbuilder != null),
      assert(restoringBuilder != null),
        key: key,