connect static method
Future<AppSession>
connect({
- required Uri vmUri,
- required DeviceTarget device,
- required FlutterRuntime runtimeFactory(),
- int appLogCapacity = 500,
- bool showTouches = false,
- 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;
}