feature library

Classes

Disposable
Interface for resources that require cleanup.
EffectHandler<Effect, Msg>
Interface for handling effects.
Feature<State, Msg, Effect>
Core interface for building features.
FeatureEffectWrapper<State, Msg, Effect, E extends Effect>
A wrapper around a Feature that intercepts specific types of effects.
FeatureObserver<State, Msg, Effect>
A base class for observing feature lifecycle events and interactions.
FeatureObserverWrapper<State, Msg, Effect>
A wrapper for adding observation capabilities to a Feature.
IMsgEmitter<Msg>
Interface for emitting messages.
IUpdate<State, Msg, Effect>
Interface for implementing the update function.
ProxyFeature<State, Msg, Effect>
A base class for creating proxy implementations of Feature.

Extensions

EffectHandlerWrapperUtils on Feature<State, Msg, Effect>
Extension for easily wrapping a feature with an EffectHandler.
FeatureObserverWrapperHelper on Feature<S, M, E>
Extension for attaching a FeatureObserver to a Feature.

Functions

next<State, Effect>({State? state, List<Effect> effects = const []}) → (State?, List<Effect>)
A helper function for constructing a Next result.

Typedefs

FunEffectHandler<Effect, Msg> = FutureOr<void> Function(Effect effect, MsgEmitter<Msg> emit)
A functional representation of an effect handler.
MsgEmitter<Msg> = void Function(Msg message)
A function type for emitting messages within effect handlers.
Next<State, Effect> = (State?, List<Effect>)
Represents the result of handling a message with the update function.
Update<State, Msg, Effect> = Next<State, Effect> Function(State state, Msg message)
A pure function type that updates the state in response to a message.