matches method
Tests whether this transition matches based on elapsedTime
and/or condition,
ignoring anEvent
.
anEvent
Ignored.
elapsedTime
The total time since the last event was triggered.
context
The data tested by the condition and modified by State.onEntry
and State.onExit.
ignoreContext
If true, skip the condition check (forces it to be true).
Implementation
@override
bool matches(
{String? anEvent,
Duration? elapsedTime,
T? context,
ignoreContext = false}) =>
(!ignoreContext && condition != null && meetsCondition(context)) ||
(elapsedTime != null && elapsedTime.compareTo(after!) >= 0);