StateMachineController constructor Null safety

StateMachineController(
  1. StateMachine stateMachine
)

Implementation

StateMachineController(StateMachine stateMachine) : super(stateMachine) {
  isActive = true;
  for (final input in stateMachine.inputs) {
    switch (input.coreType) {
      case StateMachineNumberBase.typeKey:
        _inputs.add(SMINumber._(input as StateMachineNumber, this));
        break;
      case StateMachineBoolBase.typeKey:
        _inputs.add(SMIBool._(input as StateMachineBool, this));
        break;
      case StateMachineTriggerBase.typeKey:
        _inputs.add(SMITrigger._(input as StateMachineTrigger, this));
        break;
    }
  }
}