connect method

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

Connects to the device.

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

Returns true if the device is connected, false otherwise.

Implementation

Future<bool> connect({Duration? timeout, bool debug = false}) async {
  await _bridge.executor.execute(
    ['connect', _connection.address],
    timeout: timeout,
    debug: debug,
  );
  return isConnected(debug: debug);
}