Command1<T> constructor

Command1<T>({
  1. required Future<void> action(
    1. T arg
    ),
  2. bool canExecute() = _defaultCanExecute,
})

Command with Argument

Implementation

Command1({
  required Future<void> Function(T arg) action,
  super.canExecute,
}) : _action = action;