flutter_rx_bloc library

Classes

RxBlocBuilder<B extends RxBlocTypeBase, T>
RxBlocListener<B extends RxBlocTypeBase, S>
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.
RxBlocListenerBase<B extends RxBlocTypeBase, S>
Base class for widgets that listen to state changes in a specified bloc.
RxBlocProvider<T extends RxBlocTypeBase>
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).
RxLoadingBuilder<B extends RxBlocTypeBase>
RxLoadingBuilder handles building a widget in response to new LoadingWithTag states
RxMultiBlocProvider
Merges multiple BlocProvider widgets into one widget tree.
RxResultBuilder<B extends RxBlocTypeBase, T>
RxResultBuilder handles building a widget in response to new Result states

Typedefs

RxBlocListenerCondition<S> = bool Function(S? previous, S? current)
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.
RxBlocWidgetListener<S> = void Function(BuildContext context, S? state)
Signature for the listener function which takes the BuildContext along with the bloc state and is responsible for executing in response to state changes.