StateLogicExtensions<TDerived extends StateLogic<TState>, TState> extension

Extension methods on StateLogic subclasses for registering hierarchy-aware entrance and exit callbacks.

on
  • TDerived

Methods

onEnter(VoidCallback handler) → void

Available on TDerived, provided by the StateLogicExtensions extension

Registers a callback invoked when entering this state type, but only if the previous state is not also of type TDerived.
onEnterWithPrevious(ValueCallback<TState?> handler) → void

Available on TDerived, provided by the StateLogicExtensions extension

Registers a callback invoked when entering this state type, receiving the previous state (or null if there was none). Only fires if the previous state is not also of type TDerived.
onExit(VoidCallback handler) → void

Available on TDerived, provided by the StateLogicExtensions extension

Registers a callback invoked when exiting this state type, but only if the next state is not also of type TDerived.
onExitWithNext(ValueCallback<TState?> handler) → void

Available on TDerived, provided by the StateLogicExtensions extension

Registers a callback invoked when exiting this state type, receiving the next state (or null if there is none). Only fires if the next state is not also of type TDerived.