bloc_effects library

Classes

BlocEffectListener<B extends Effects<E>, E>
Takes a EffectWidgetListener and an optional effector and invokes the listener in response to effect emitting in the effector. It should be used for functionality that needs to occur only in response to a effect such as navigation, showing a SnackBar, showing a Dialog, etc... The listener is guaranteed to only be called once for each effect.
BlocWithEffects<Event, State, Effect>
Takes a Stream of Events as input and transforms them into a Stream of States as output.
BlocWithEffectsObserver
An interface, witch add observing the effects using behavior of Bloc instances.
CubitWithEffects<State, Effect>
A Cubit is similar to Bloc but has no notion of events and relies on methods to emit new states.

Mixins

Effects<E>
Mixin Effects provides implementation for BaseEffector

Typedefs

EffectWidgetListener<Effect> = void Function(BuildContext, Effect)
Signature for the listener function which takes the BuildContext along with the effect. It is responsible for executing in response to new effect emitted. If the state snapshot is necessary on the moment of effect emitting, you can provide it using the properties of the effect class.