cancelIf method

void cancelIf(
  1. bool test(
    1. StateChange stateChange
    )
)

Add a test that will be called before executing this transition. If test returns true, the transition will be canceled.

Implementation

void cancelIf(bool test(StateChange stateChange)) {
  _cancelTests.add(test);
}