waitForDevice method

Future<void> waitForDevice({
  1. Duration? timeout,
  2. bool debug = false,
})

Waits for the device to be connected.

timeout is optional and can be used to specify the maximum time to wait.

Implementation

Future<void> waitForDevice({Duration? timeout, bool debug = false}) async {
  await _bridge.executor.execute(
    [..._connection.arguments, 'wait-for-device'],
    timeout: timeout,
    debug: debug,
  );
}