call method

  1. @override
Future call(
  1. Invocation invocation,
  2. FutureOr next()?
)
override

Implementation

@override
Future<dynamic> call(Invocation invocation, FutureOr<dynamic> Function()? next) async {
  bool enabled = invocation.command.enabled;
  try {
    invocation.command.enabled = false;

    return await Future.value(next!());
  }
  finally {
    invocation.command.enabled = enabled;
  }
}