canExecute method

  1. @override
bool canExecute(
  1. TState state
)
override

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);
}