run<R> method
Runs body inside a scope named scope with this application's
container active (commands, tests, scripts).
Implementation
Future<R> run<R>(
FutureOr<R> Function() body, {
String scope = 'command',
}) async {
await boot();
return container.runScoped<R>(scope, (_) => body());
}