createInstance method
Override to provide a fresh uninitialized instance of this type.
Required for cloning to work. Example:
@override
MyEntity createInstance() => MyEntity(app);
Implementation
@override
CStateMachine<T> createInstance() {
final c = CStateMachine<T>(app);
c._states = .from(_states);
c._transitions = .from(_transitions);
c._current = _current;
c._timeInState = _timeInState;
c._started = _started;
c._entered = _entered;
return c;
}