BidirectionalHydratedBloc<E extends BlocEvent, S extends HydratedBlocState> constructor
BidirectionalHydratedBloc<E extends BlocEvent, S extends HydratedBlocState> ({
- required BlocStore<
S> store, - required String persitenceKey,
- BlocStateBuilder<
S> ? initialStateBuilder, - S? initialState,
Implementation
BidirectionalHydratedBloc({
required this.store,
required this.persitenceKey,
super.initialStateBuilder,
super.initialState,
}) {
subxList.add(onData.listen((S state) {
Stream.fromFuture(store.persist(persitenceKey, state));
}));
}