InitedState<T> class

A strongly-initialized state container that must be given a value at creation.

Ensures that state is always non-null, and provides convenience methods for refreshing or transforming the stored value.

Constructors

InitedState.new(T initialState)
Creates and registers an initial state.

Properties

data → T
Returns the currently stored state value.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uniqueKey UniqueKey
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on(Widget build(T)) StateBuilder
Associates this state with a reactive widget builder.
refreshUpdate(T update(T)) → void
Updates the current state using the given transformation update.
refreshWith(T newState) → void
Replaces the current state with newState and notifies listeners.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited