validNextState method Null safety

bool validNextState(
  1. ProbeState nextState
)

Is ProbeState a valid next state for this probe?

For example:

  • if the current state of this probe is initialized then a valid next state is resumed.
  • if the current state of this probe is resumed then a valid next state is paused.
  • if the current state of this probe is resumed then initialized is not a valid next state.

Implementation

bool validNextState(ProbeState nextState);