Skip to content

Device discovery takes a long time, even when the targeted device is found immediately (flutter_tester, chrome, macos, linux, etc) #61466

@jmagman

Description

@jmagman

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,
]);

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projecttoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions