State class

The State feature provides functionality to make it possible to implement state management for components.

Constructors

State()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

change() → void Function()
Returns a function that is intended to be used as a function to change the state of a component.
get<T>(String key, T init()) → T
The get method takes the state variable name and its initial value and returns the current value of that variable.
set<T>(String key) → void Function(T value)
The set method takes a state variable name and returns a function that is intended to be used as a function to set the value of a variable.
use<T>(String key, T init()) → Never
Not implemented prior to the implementation of the 'records'