Currently all the device discovers are awaited, even if the targeted device is found immediately.
|
Future<List<Device>> getDevicesById(String deviceId) async { |
|
final List<Device> devices = await getAllConnectedDevices(); |
|
Future<List<Device>> getAllConnectedDevices() async { |
|
final List<List<Device>> devices = await Future.wait<List<Device>>(<Future<List<Device>>>[ |
|
for (final DeviceDiscovery discoverer in _platformDiscoverers) |
|
discoverer.devices, |
|
]); |