LifecycleState enum

This enum keeps track of the Component's current stage in its lifecycle.

The progression between states happens as follows:

  uninitialized -> loading -> loaded -> mounted -> removing -> removed -.
                                          ^-----------------------------'

Publicly visible flags isLoaded and isMounted are derived from this state:

  • isLoaded = loaded | mounted | removed
  • isMounted = mounted
Inheritance

Constructors

LifecycleState()
const

Values

uninitialized → const LifecycleState

The original state of a Component, when it was just constructed.

loading → const LifecycleState

The component is currently running its onLoad method.

loaded → const LifecycleState

The component has just finished running its onLoad step, but before it is mounted.

mounted → const LifecycleState

The component has finished running its onMount step, and was added to its parent's children list.

removing → const LifecycleState

The component is scheduled to be removed on the next game tick.

removed → const LifecycleState

The component which was mounted before, is now removed from its parent.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
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

Constants

values → const List<LifecycleState>
A constant List of the values in this enum, in order of their declaration.