I want to do the equivalent of this Python code in Dart. Possibly as a one liner I could use in a return statement.
m = {1: 'a', 2: 'b', 3: 'c'}
l = [1, 3]
[m[index] for index in l]
this results in a new list like this ['a', 'c']
A long version of this in Dart would be this.
List<String> r = [];
for (var key in l) {
r.add(m[key]);
}