canExecute method
Allows to block execution if the state isn't valid.
Defaults to always true
.
Implementation
@override
bool canExecute(TState state) {
if (_failed == null) {
return Action.defaultCanExecute<TState>(state);
}
return _canExecute!(state);
}