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 effectemits in the bloc. It should be used for functionality that needs to occur only in response to aside effectemit such as navigation, showing aSnackBar, showing aDialog, etc... The listener is guaranteed to only be called once for eachside effect. -
BlocSideEffectListenerBase<
B extends SideEffectProvider< C> , C> - Base for widgets that listen to side effect emits in a specified bloc.
- MultiBlocSideEffectListener
-
Merges multiple
BlocListenerwidgets into one widget tree. -
SideEffectBloc<
EVENT, STATE, COMMAND> -
Abstract class which extend base bloc with
StreamofSide effects -
SideEffectProvider<
SIDE_EFFECT> - An object that provides access to a stream of side effects over time.
Mixins
- BlocSideEffectListenerSingleChildWidget
-
Mixin which allows
MultiBlocSideEffectListenerto infer the types of multiple BlocWidgetSideEffectListeners. -
SideEffectBlocMixin<
EVENT, STATE, SIDE_EFFECT> -
Mixin to enrich the existing bloc with
StreamofSide effects
Typedefs
-
BlocWidgetSideEffectListener<
C> = void Function(BuildContext context, C sideEffect) -
Signature for the
listenerfunction which takes theBuildContextalong with theside effect.