alt_bloc library

Classes

Bloc
Business Logic Component (BLoC). [...]
BlocBuilder<B extends Bloc, S>
Widget that accept Bloc of type B and subscribes on states stream of type S. [...]
BlocConsumer<B extends Bloc, S>
Widget that accept Bloc of type B and subscribes on states stream of type S. [...]
BlocProvider<B extends Bloc>
Widget that responsible to create the Bloc with help of create function. Accepts any Widget as child and provides the ability for child to obtain the Bloc. [...]
Provider<B extends Bloc>
InheritedWidget that encapsulated by BlocProvider and allow BlocProvider.child widgets tree to obtain the Bloc object.
RouteData<T>
The class that contains all information about navigation.
RouteListener<B extends Bloc>
Widget that subscribes on Bloc.navigationStream, listen for navigation actions and handle them. If bloc was not provided Provider.of will be used by default. [...]

Typedefs

BlocRouter<Result>(BuildContext context, String name, dynamic args) Future<Result>
Signature of function that use to listen for navigation events and return navigation result.
BlocWidgetBuilder<S>(BuildContext context, S state) Widget
Signature of function that use to build and return Widget depending on state.
Consumer<T>(T state) → void
Precondition<S>(S previousState, S currentState) bool
Signature of predicate function that use to compare states of Bloc.
ResultConsumer<T>(Future<T>) → void
Signature of callbacks that use to return navigation result to the Bloc.
UpdateShouldNotify<T>(T previous, T current) bool
Signature of predicate function that use to compare Bloc objects.