call method

  1. @override
Future<void> call([
  1. Object? parameter
])
override

Executes this command.

  • parameter is an optional value. It will depend on the type of command whether this will be handled or not.

Implementation

@override
Future<void> call([Object? parameter]) async {
  if (canExecute.value) {
    try {
      isExecuting.value = true;
      await execute(parameter);
    } finally {
      isExecuting.value = false;
    }
  }
}