UIState class

Represents a state in the state based view workflow.

A state consists of an id and transitions to other states. They can be grouped within GroupState's. In that case a reference to the direct parent group is stored within parent. States can also be conditional, in which case the special constructor State.conditional must be used.

Implementers

Constructors

UIState({required String id, GroupState? parent})
Creates an instance of UIState with the default properties set.
UIState.conditional({required String id, GroupState? parent, required bool condition()?, required String? fallbackId})
Creates an conditional instance of UIState.

Properties

condition → (bool Function()?)
The entering condition of this state.
final
fallbackId String?
The fallback state id which is used if the condition fails.
final
fallbackTransition TriggerTransition
Returns the fallback transition for a conditional state.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasParent bool
no setter
id String
An unique identifier.
final
isConditional bool
no setter
parent GroupState?
The parent state associated with this state.
getter/setter pair
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

check() bool
Executes the condition if set and returns the result.
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