UIStateManager class

The Statemanager class provides a workflow for state based view management.

This class is the core component of the ui state workflow and manages the validation of conditions and transitions between states. If the class is initialized with use of the constructor, all states and transitions must be defined at once. It can additionally instantiated by using the helper class UIStateManagerFactory.

Inheritance

Constructors

UIStateManager({required Set<UIState> states, required Set<Transition> transitions})
Creates an instance of UIStateManager.
UIStateManager.initialized({required Set<UIState> states, required Set<Transition> transitions})
Creates an instance of UIStateManager and initializes it upon creation.
factory
UIStateManager.validated({required Set<UIState> states, required Set<Transition> transitions})
Creates an instance of UIStateManager and validates it upon creation.
factory

Properties

currentState UIState?
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isInitialized bool
no setter
isProcessingTriggers bool
no setter
isValid bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
states Set<UIState>
no setter
transitions Set<Transition>
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
applyTriggers() bool
Searches for a valid state by traversing available trigger transitions.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
goTo(String id) → void
Tries to make a transition from the current state to the state specified by id.
goToState(UIState state) → void
Tries to make a transition from the current state to the specified target state.
initialize() → void
Initiates this state manager.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited
validate() → void
Validates the state manager and the associated data.

Operators

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