run<T> static method
MyBootstrapTask
run<T>(
- Future<
T> body(), { - MyBootstrapSeverity severity = MyBootstrapSeverity.degraded,
- String? debugLabel,
任意会完成的工作。返回类型由闭包推断,不会预先钉成 void。
Implementation
static MyBootstrapTask run<T>(
Future<T> Function() body, {
MyBootstrapSeverity severity = MyBootstrapSeverity.degraded,
String? debugLabel,
}) {
return MyBootstrapTask._(
() => _executeGuarded(body),
severity: severity,
debugLabel: debugLabel,
);
}