From 768fca8be9113a512fa40da005bed66454a8f3db Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 9 May 2018 08:45:00 +0100 Subject: [PATCH] Trim all space/dots from end Depending on whether can read the AVD (or it even has all fields populated) we might get extra "empty" columns, so this trims all blank cells from the end. --- packages/flutter_tools/lib/src/emulator.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/lib/src/emulator.dart b/packages/flutter_tools/lib/src/emulator.dart index c72efed436d..81bbe2aa65f 100644 --- a/packages/flutter_tools/lib/src/emulator.dart +++ b/packages/flutter_tools/lib/src/emulator.dart @@ -123,11 +123,14 @@ abstract class Emulator { } // Join columns into lines of text + final RegExp whiteSpaceAndDots = new RegExp(r'[•\s]+$'); return table.map((List row) { return indices .map((int i) => row[i].padRight(widths[i])) - .join(' • ') + (row.last != '' ? ' • ${row.last}' : ''); - }).toList(); + .join(' • ') + ' • ${row.last}'; + }) + .map((String line) => line.replaceAll(whiteSpaceAndDots, '')) + .toList(); } static void printEmulators(List emulators) {