map static method
dynamic
map(
- List ary,
- dynamic each(
- dynamic _,
- dynamic callback(
- dynamic msg
- dynamic done(
- dynamic results
Async array map using after
Implementation
static map(List ary, each(_, callback(msg)), done(results)) {
var result = [];
Future.wait(ary.map((e) {
return new Future.microtask(() => each(e, (msg) {
result.add(msg);
}));
})).then((r) => done(result));
}