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 aside effect
emit 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
BlocListener
widgets into one widget tree. -
SideEffectBloc<
EVENT, STATE, COMMAND> -
Abstract class which extend base bloc with
Stream
ofSide 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
ofSide effects
Typedefs
-
BlocWidgetSideEffectListener<
C> = void Function(BuildContext context, C sideEffect) -
Signature for the
listener
function which takes theBuildContext
along with theside effect
.