ezbloc library

Classes

AutoPersistedBloc<S>
If bloc is not a singleton then tags must be provided to differentiate between different instances, otherwise different instances will overwrite each other
Bloc<S>
The central class behind this library
BlocEventsPrinter<R extends Bloc<S>, S>
BlocMonitor<R extends Bloc<S>, S>
Callbacks which are sent by the blocs, can be used for debugging or side effects
HivePersistenceService
ListOp<T>
PersistedBloc<S>
PersistenceService

Functions

testBloc<R extends Bloc<S>, S>(dynamic description, {FutureVoidCallback? setup, required BlocTestBloc<R> bloc, BlocCallback<R>? expectBefore, BlocCallback<R>? expectAfter, required StreamMatcher expectedStates, BlocCallback<R>? job, BlocTestTransform<R, S, dynamic>? transform, Duration timeout = const Duration(minutes: 1), bool testDistinctStatesOnly = false}) → void
Utility function which abstracts over a dart test to ease off bloc testing

Typedefs

BlocCallback<R> = Future<void> Function(R)
BlocListener = void Function(BlocEventType type)
BlocTestBloc<R> = Future<R> Function()
BlocTestTransform<R, S, T> = T Function(R, S)
BlocTestVoidCallback = void Function()
Deserializer<T> = T Function(dynamic json)
FutureVoidCallback = Future<void> Function()
PersistenceServiceBuilder = PersistenceService Function(String name)