connect static method

Future<AppSession> connect({
  1. required Uri vmUri,
  2. required DeviceTarget device,
  3. required FlutterRuntime runtimeFactory(),
  4. int appLogCapacity = 500,
  5. bool showTouches = false,
  6. AppLogBuffer? appLogs,
})

Connect a Flutter-mode session: attach the VM and build the pipeline.

Implementation

static Future<AppSession> connect({
  required Uri vmUri,
  required DeviceTarget device,
  required FlutterRuntime Function() runtimeFactory,
  int appLogCapacity = 500,
  bool showTouches = false,
  AppLogBuffer? appLogs,
}) async {
  final app = AppSession._(
    device: device,
    backend: device.createBackend(),
    deviceMode: false,
    appLogs: appLogs ?? AppLogBuffer(capacity: appLogCapacity),
    vmUri: vmUri,
  )..showTouches = showTouches;
  await app._bind(runtimeFactory);
  await app._restoreStaleSystemTouches();
  return app;
}