connectAllConnectableDevices method
Connect all connectable devices to be used in the deployment and which are available on this phone.
Implementation
Future<void> connectAllConnectableDevices() async {
assert(deployment != null, 'Deployment is null.');
debug('$runtimeType - Trying to connect to all connectable devices.');
// connect all the connected devices and the primary device (i.e. this phone)
for (var configuration in deployment!.devices) {
var device = deviceRegistry.getDevice(configuration.type);
if (device != null && await device.canConnect()) await device.connect();
}
}