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.
This commit is contained in:
Danny Tuppeny 2018-05-09 08:45:00 +01:00 committed by Danny Tuppeny
parent 6cd22d01aa
commit 768fca8be9

View File

@ -123,11 +123,14 @@ abstract class Emulator {
}
// Join columns into lines of text
final RegExp whiteSpaceAndDots = new RegExp(r'[•\s]+$');
return table.map((List<String> 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<Emulator> emulators) {