Show unsupported devices when no supported devices are connected (#56531)

This commit is contained in:
JustWe
2020-06-04 07:14:38 +08:00
committed by GitHub
parent 91e7678f79
commit 6c8d7b00ff
6 changed files with 100 additions and 7 deletions

View File

@@ -557,6 +557,13 @@ abstract class Device {
await descriptions(devices).forEach(globals.printStatus);
}
static List<String> devicesPlatformTypes(List<Device> devices) {
return devices
.map(
(Device d) => d.platformType.toString(),
).toSet().toList()..sort();
}
/// Convert the Device object to a JSON representation suitable for serialization.
Future<Map<String, Object>> toJson() async {
final bool isLocalEmu = await isLocalEmulator;