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:
parent
6cd22d01aa
commit
768fca8be9
@ -123,11 +123,14 @@ abstract class Emulator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Join columns into lines of text
|
// Join columns into lines of text
|
||||||
|
final RegExp whiteSpaceAndDots = new RegExp(r'[•\s]+$');
|
||||||
return table.map((List<String> row) {
|
return table.map((List<String> row) {
|
||||||
return indices
|
return indices
|
||||||
.map((int i) => row[i].padRight(widths[i]))
|
.map((int i) => row[i].padRight(widths[i]))
|
||||||
.join(' • ') + (row.last != '' ? ' • ${row.last}' : '');
|
.join(' • ') + ' • ${row.last}';
|
||||||
}).toList();
|
})
|
||||||
|
.map((String line) => line.replaceAll(whiteSpaceAndDots, ''))
|
||||||
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printEmulators(List<Emulator> emulators) {
|
static void printEmulators(List<Emulator> emulators) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user