FlutterDriver.connectedTo constructor

  1. @visibleForTesting
FlutterDriver.connectedTo(
  1. {FlutterWebConnection? webConnection,
  2. VmService? serviceClient,
  3. Isolate? appIsolate}
)

Creates a driver that uses a connection provided by either the combination of webConnection, or the combination of serviceClient and appIsolate for the VM.

Implementation

@visibleForTesting
factory FlutterDriver.connectedTo({
  FlutterWebConnection? webConnection,
  vms.VmService? serviceClient,
  vms.Isolate? appIsolate,
}) {
  if (webConnection != null) {
    return WebFlutterDriver.connectedTo(webConnection);
  }
  return VMServiceFlutterDriver.connectedTo(serviceClient!, appIsolate!);
}