exportLast method
Exports the last record as a String
.
All entities must have at least one entry. All entities must have the same number of records (the same length).
Implementation
String exportLast({int precision = 10, String delimiter = ' '}) {
final data = <num>[];
final b = StringBuffer('# ');
for (var key in keys) {
b.write(' $key ');
b.write(''.padRight(precision ~/ 2));
data.add(get(key).last);
}
b.write('\n');
for (var entry in data) {
b.write(entry.toStringAsPrecision(precision) + delimiter);
}
b.write('\n');
return b.toString();
}