waitFor method

Future<void> waitFor(
  1. Object target, {
  2. Duration? timeout,
})

Waits up to timeout (the actor's timeout by default) for target to be on screen.

Implementation

Future<void> waitFor(Object target, {Duration? timeout}) async {
  await _reach(Find.target(target), timeout: timeout, reveal: false);
}