createOrStart method
If the device already exists, start it instead of createing it. If all devices of the model, os, and osVersion type are already running, a new virtual device will be created and then started.
Implementation
@override
Future<void> createOrStart() async {
final devices = await availableDevices();
final device = firstWhereOrNull<AndroidEmulator>(
devices,
(d) => d.os == os && d.osVersion == osVersion && d.model == model,
);
if (device != null) {
return await device.start();
}
await create();
await start();
}