getAction<T> method
Gets the action by the given key
, returns null if not found.
Note that if found action's type does not match given T
, it will throw _CastError.
Implementation
Action<T>? getAction<T>([dynamic key = '']) {
var action = _actions[key];
if (action != null) {
return action as Action<T>;
}
return null;
}