runWith<R> static method

R runWith<R>(
  1. void sink(
    1. Object error,
    2. StackTrace stack
    ),
  2. R body()
)

Runs body with sink as the reporter for everything it awaits.

Implementation

static R runWith<R>(
  void Function(Object error, StackTrace stack) sink,
  R Function() body,
) {
  return runZoned(body, zoneValues: {_zoneKey: sink});
}