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 typeS
. -
BlocConsumer<
B extends Bloc, S> -
Widget that accept Bloc of type
B
and subscribes on states stream of typeS
. -
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> = Future< Result> Function(BuildContext context, String? name, dynamic args) - Signature of function that use to listen for navigation events and return navigation result.
-
BlocWidgetBuilder<
S> = Widget Function(BuildContext context, S state) -
Signature of function that use to build and return Widget depending on
state
. -
Consumer<
T> = void Function(T state) -
Precondition<
S> = bool Function(S previousState, S newState) - Signature of predicate function that use to compare states of Bloc.
-
ResultConsumer<
T> = void Function(Future< T> ?) - Signature of callbacks that use to return navigation result to the Bloc.
-
UpdateShouldNotify<
T> = bool Function(T previous, T current) - Signature of predicate function that use to compare Bloc objects.