state library

Typed Flutter state management annotations and runtime for Dust.

Classes

AsyncData<T>
Async data loaded successfully.
AsyncFailure<T>
Async load failed.
AsyncInitial<T>
No async load has started yet.
AsyncLoading<T>
Async data is loading.
AsyncState<T>
Lifecycle state for generated async ViewModels.
AsyncViewModelBase<TData, TArgs extends ViewModelArgs>
Base class used by generated async Dust view model bases.
BuildContext
A handle to the location of a widget in the widget tree.
ErrorDescription
An explanation of the problem and its cause, any information that may help track down the problem, background information, etc.
FlutterErrorDetails
Class for information provided to FlutterExceptionHandler callbacks.
Future<T>
The result of an asynchronous computation.
InheritedWidget
Base class for widgets that efficiently propagate information down the tree.
LoggingStateObserver
Debug observer that logs state transitions and effects.
SilentStateObserver
No-op observer for tests and production apps that do not want logging.
State<T extends StatefulWidget>
The logic and internal state for a StatefulWidget.
StateEffect
One-shot event emitted by a ViewModelBase.
StatefulWidget
A widget that has mutable state.
StatelessWidget
A widget that does not require mutable state.
StateObserver
Receives state transitions and one-shot effects from view models.
StreamSubscription<T>
A subscription on events from a Stream.
ViewModel
Marks a class as a Dust view model generation target.
ViewModelActionToken
Token used by view models to ignore stale async work.
ViewModelArgs
Shared dependency bundle base for generated view models.
ViewModelBase<TState, TArgs extends ViewModelArgs>
Base class used by generated Dust view model bases.
ViewModelScopes
Groups generated ViewModel scopes without manual nesting.
Widget
Describes the configuration for an Element.

Enums

ViewModelMode
Selects the generated ViewModel API.

Functions

scheduleMicrotask(void callback()) → void
Runs a function asynchronously.

Typedefs

ViewModelScopeBuilder = Widget Function(Widget child)
Builds one ViewModel scope around child.

Exceptions / Errors

FlutterError
Error class used to report Flutter-specific assertion failures and contract violations.