side_effect_bloc library

Classes

BlocSideEffectListener<B extends SideEffectProvider<C>, C>
Takes a BlocWidgetSideEffectListener and an optional bloc and invokes the listener in response to side effect emits in the bloc. It should be used for functionality that needs to occur only in response to a side effect emit such as navigation, showing a SnackBar, showing a Dialog, etc... The listener is guaranteed to only be called once for each side effect.
BlocSideEffectListenerBase<B extends SideEffectProvider<C>, C>
Base for widgets that listen to side effect emits in a specified bloc.
MultiBlocSideEffectListener
Merges multiple BlocListener widgets into one widget tree.
SideEffectBloc<EVENT, STATE, COMMAND>
Abstract class which extend base bloc with Stream of Side effects
SideEffectProvider<SIDE_EFFECT>
An object that provides access to a stream of side effects over time.

Mixins

BlocSideEffectListenerSingleChildWidget
Mixin which allows MultiBlocSideEffectListener to infer the types of multiple BlocWidgetSideEffectListeners.
SideEffectBlocMixin<EVENT, STATE, SIDE_EFFECT>
Mixin to enrich the existing bloc with Stream of Side effects

Typedefs

BlocWidgetSideEffectListener<C> = void Function(BuildContext context, C sideEffect)
Signature for the listener function which takes the BuildContext along with the side effect.