StateMachine<TEnum> constructor

StateMachine<TEnum>(
  1. List<TEnum> _enum
)

Constructs a StateMachine instance with the specified list of states.

The parameter TEnum list should correspond to a valid enum declaration or interface with the same members as a enum declaration with compile-time constants. The enumuration entries must be 0-indexed and incremented by 1 for every subsequent enumeration entry that follow the first entry.

Implementation

StateMachine(final this._enum)
    : assert(_enum.isNotEmpty),
      assert(_isIndexedFromZeroIncrementally(_enum)),
      super(_enum.length);