show device list in flutter doctor output (#5697)

* show device list in flutter doctor output
fixes https://github.com/flutter/flutter/issues/5625
diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart
index e78b19c..c9d454e 100644
--- a/packages/flutter_tools/lib/src/device.dart
+++ b/packages/flutter_tools/lib/src/device.dart
@@ -236,7 +236,7 @@
   @override
   String toString() => name;
 
-  static void printDevices(List<Device> devices) {
+  static Iterable<String> descriptions(List<Device> devices) {
     int nameWidth = 0;
     int idWidth = 0;
 
@@ -245,12 +245,16 @@
       idWidth = math.max(idWidth, device.id.length);
     }
 
-    for (Device device in devices) {
+    return devices.map((Device device) {
       String supportIndicator = device.isSupported() ? '' : ' (unsupported)';
-      printStatus('${device.name.padRight(nameWidth)} • '
-        '${device.id.padRight(idWidth)} • '
-        '${getNameForTargetPlatform(device.platform)}$supportIndicator');
-    }
+      return '${device.name.padRight(nameWidth)} • '
+             '${device.id.padRight(idWidth)} • '
+             '${getNameForTargetPlatform(device.platform)}$supportIndicator';
+    });
+  }
+
+  static void printDevices(List<Device> devices) {
+    descriptions(devices).forEach((String msg) => printStatus(msg));
   }
 }