onExit method

void onExit(
  1. OnExit onExit, {
  2. String? label,
})

Sets callback that will be called right before machine exits this State.

Implementation

void onExit(OnExit onExit, {String? label}) {
  _stateDefinition
    ..onExit = onExit
    ..onExitLabel = label;
}