yx_state library

A state management library for Dart/Flutter applications.

Classes

Emitter<State extends Object?>
Interface for objects that can emit new state values and track completion status.
FunctionHandler<State extends Object?>
Handles the processing of state update functions.
HandleTask<State extends Object?>
A task that can be handled by a function handler.
StateManager<State extends Object?>
Main class for state management that should be extended by users.
StateManagerBase<State extends Object?>
Base implementation of a state manager.
StateManagerBaseTestUtil<State extends Object?>
A utility class for testing StateManagerBase instances.
StateManagerObserver
An abstract class for observing state manager lifecycle events.
StateManagerOverrides
Global configuration for state managers.
StateReadable<State extends Object?>
An interface for objects that provide read access to a state stream.
StreamFunctionHandler<State extends Object?>
A function handler implementation that uses streams to process state updates.

Typedefs

Emittable<State extends Object?> = void Function(State state)
Callback type for updating state by providing a new State value.
EmitterHandler<State extends Object?> = Future<void> Function(Emitter<State> emit)
Function signature for asynchronous state management operations that use an Emitter.
FunctionHandlerFactory = FunctionHandler<State> Function<State extends Object?>()
A factory function that creates a FunctionHandler with a specific state type.
HandleTaskMapper<State extends Object?> = Stream<HandleTask<State>> Function(HandleTask<State> task)
Signature for a function which converts an incoming task into an outbound stream of tasks.
HandleTaskTransformer<State extends Object?> = Stream<HandleTask<State>> Function(Stream<HandleTask<State>> tasks, HandleTaskMapper<State> mapper)
Used to change how tasks are processed.