ezbloc_flutter 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<T>
Extending s.Bloc here, because this one has a dependency on the flutter sdk
BlocBuilder<S>
BlocConfig
BlocContainer
Builds, saves and provides Bloc independent of the build tree
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
BlocProvider<T extends Bloc>
StatefulWidget that is used to provide a Bloc to its child tree.
BlocProviderState<T extends Bloc>
BlocResolver<T extends Bloc, R>
Creates and caches bloc instances on the fly
HivePersistenceService<T>
InMemoryPersistenceService<T>
ListOp<T>
PersistenceService<T>

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

ArgBlocBuilder<T, R> = T Function(R arg)
Takes context and arg, returns a Bloc
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()
BlocWithArgBuilder<T> = T Function(BuildContext? context, dynamic arg)
Takes context and arg, returns a Bloc
BusyBuilder<T> = Widget Function(BuildContext context, T? data)
This function takes a context and data of type T and returns a widget
DataBuilder<T> = Widget Function(BuildContext context, T data)
This function takes a context and data of type T and returns a widget
Deserializer<T> = T Function(dynamic o)
ErrorBuilder<T> = Widget Function(BuildContext context, T? error)
This function takes a context and an error and returns a widget
FutureVoidCallback = Future<void> Function()
GlobalBusyBuilder = Widget Function(BuildContext context, Bloc bloc, Widget? lastStateBuild)
This function takes a BuildContext, Bloc, and a Widget and returns a widget
GlobalErrorBuilder = Widget Function(BuildContext context, Bloc bloc, Widget? lastStateBuild)
This function takes a BuildContext, Bloc, and a Widget and returns a widget
Serializer<T> = dynamic Function(T o)
ShouldSkip<T> = bool Function(T pastState, T currentState)
This function takes pastState and currentState