start method

CStateMachine<T> start(
  1. String initialState
)

Start the machine in initialState. Fires that state's onEnter.

Implementation

CStateMachine<T> start(String initialState) {
  if (_started) {
    throw StateError('start() called twice.');
  }
  _requireState(initialState);
  _started = true;
  _current = initialState;
  _timeInState = 0;
  _entered = false;
  return this;
}