run<T> method
Future<T>
run<T>({
- required Future<
T> body(), - Future<
void> beforeClose(- Object? bodyError,
- StackTrace? bodyStackTrace
Implementation
Future<T> run<T>({
required Future<T> Function() body,
Future<void> Function(Object? bodyError, StackTrace? bodyStackTrace)?
beforeClose,
}) async {
final outcome = await runCaptured<T>(
body: body,
beforeClose: beforeClose,
);
return outcome.requireValue();
}