IsolateBlocBuilder handles building a widget in response to new states.
IsolateBlocBuilder is analogous to StreamBuilder but has simplified API to
reduce the amount of boilerplate code needed as well as bloc-specific
performance improvements.
Please refer to IsolateBlocListener if you want to "do" anything in response to
state changes such as navigation, showing a dialog, etc...
IsolateBlocConsumer exposes a builder and listener in order react to new
states.
IsolateBlocConsumer is analogous to a nested IsolateBlocListener
and IsolateBlocBuilder but reduces the amount of boilerplate needed.
IsolateBlocConsumer should only be used when it is necessary to both rebuild UI
and execute other reactions to state changes in the bloc.
Takes a BlocWidgetListener and an optional bloc and invokes
the listener in response to state changes in the bloc.
It should be used for functionality that needs to occur only in response to
a state change such as navigation, showing a SnackBar, showing
a Dialog, etc...
The listener is guaranteed to only be called once for each state change
unlike the builder in BlocBuilder.
Takes a ValueBuilder that is responsible for creating the bloc and
a child which will have access to the bloc via
IsolateBlocProvider.of(context).
It is used as a dependency injection (DI) widget so that a single instance
of a bloc can be provided to multiple widgets within a subtree.
Occurs when an event is added after onEventReceived has been called
but before the bloc's State has been updated.
A Transition consists of the currentState, the event which was
added, and the nextState.
Manager which is works in UI Isolate, responds on IsolateBlocEvents from Isolate,
manages IsolateBlocWrappers and implements createBloc global function.
Signature for the buildWhen function which takes the previous state and
the current state and is responsible for returning a bool which
determines whether to rebuild IsolateBlocBuilder with the current state.
Signature for the builder function which takes the BuildContext and
state and is responsible for returning a widget which is to be rendered.
This is analogous to the builder function in StreamBuilder.
Signature for initialization function which would be run in Isolate to
initialize your blocs and repository.
Initializer must be a global or static function.
Signature for the listenWhen function which takes the previous state
and the current state and is responsible for returning a bool which
determines whether or not to call BlocWidgetListener of IsolateBlocListener
with the current state.