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
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