builders library
Classes
-
BlocBuilder<
C extends Cubit< S> , S> - {@endtemplate}
-
BlocBuilderBase<
C extends Cubit< S> , S> - Base class for widgets that build themselves based on interaction with a specified cubit.
-
BlocConsumer<
S extends Cubit< V> , V> -
BlocConsumer exposes a builder and listener in order react to new
states.
BlocConsumer is analogous to a nested
BlocListener
andBlocBuilder
but reduces the amount of boilerplate needed. BlocConsumer should only be used when it is necessary to both rebuild UI and execute other reactions to state changes in thecubit
. - Builders
-
Consumer<
T extends ChangeNotifier> -
Selector<
T extends ChangeNotifier, D>
Typedefs
-
BlocBuilderCondition<
S> = bool Function(S previous, S current) -
Signature for the
buildWhen
function which takes the previousstate
and the currentstate
and is responsible for returning a bool which determines whether to rebuild BlocBuilder with the currentstate
. -
BlocWidgetBuilder<
S> = Widget Function(BuildContext context, S state) -
Signature for the
builder
function which takes theBuildContext
andstate
and is responsible for returning a widget which is to be rendered. This is analogous to thebuilder
function in StreamBuilder. -
ProviderReturn<
T> = T? Function< T extends Object>()