flutter_rx_bloc library

Classes

RxBlocBuilder<B extends RxBlocTypeBase, T>
RxBlocBuilder is a Flutter widget which requires a bloc from the RxBloc ecosystem, a builder and a state function. RxBlocBuilder handles building the widget in response to new states. RxBlocBuilder is very similar to StreamBuilder but has a more simple API to reduce the amount of boilerplate code needed.
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.
RxBlocMultiBuilder2<B extends RxBlocTypeBase, T1, T2>
RxBlocMultiBuilder2 is a Flutter widget that requires a bloc from the RxBloc ecosystem, a builder, state1 and state2 function. RxBlocMultiBuilder2 handles building the widget in response to new states. RxBlocMultiBuilder2 is very similar to StreamBuilder but has a more simple API to reduce the amount of boilerplate code needed.
RxBlocMultiBuilder3<B extends RxBlocTypeBase, T1, T2, T3>
RxBlocMultiBuilder3 is a Flutter widget that requires a bloc from the RxBloc ecosystem, a builder, state1, state2 and state3 functions. RxBlocMultiBuilder3 handles building the widget in response to new states. RxBlocMultiBuilder3 is very similar to StreamBuilder but has a more simple API to reduce the amount of boilerplate code needed.
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.