runAsync<T> method

Future<T> runAsync<T>(
  1. FutureOr<T> body(
    1. Terminice t
    )
)

Runs asynchronous body with this tester's terminal active.

The previously active terminal is restored after the returned future completes, whether it succeeds or fails.

Implementation

Future<T> runAsync<T>(FutureOr<T> Function(Terminice t) body) {
  return TerminalContext.runWithAsync(terminal, () => body(terminice));
}