Takes a RxBlocWidgetListener 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 RxBlocBuilder.
Used as a DI widget where an instance of a bloc can be provided
to multiple widgets within a subtree.
Takes a ValueBuilder that is responsible for creating the bloc
and a child which will have access to the bloc
via RxBlocProvider.of(context).
Signature for the condition function which takes the previous state
and the current state
and is responsible for returning a bool which determines whether or not
to call RxBlocWidgetListener
of RxBlocListener with the current state.
Signature for the listener
function which takes the BuildContext
along with the blocstate
and is responsible for executing in response to state changes.