State class abstract

All your stateclasses have to extend this class, this class does not actually have any functionality other than making it more clear which classes are state and which are not Good practice is keeping state immutable, try to follow this rule as much as possible. Example of a valid stateclass:

class Counter implements State{
  final int count;
  const Counter(this.counter);

  Counter addOne(){
    return Counter(counter + 1);
  }
}

Look at the documentation of Store for more details on how to implements this state

Implementers

Constructors

State()
const

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