I would like to know if I can call a function with name parameters using a map e.g.
void main()
{
Map a = {\'m\':\
You can use Function.apply to do something similar :
main() {
final a = new Map();
a[const Symbol('m')] = 'done';
Function.apply(slave, [], a);
}
You can also extract an helper method to simplify the code :
main() {
final a = symbolizeKeys({'m':'done'});
Function.apply(slave, [], a);
}
Map symbolizeKeys(Map map){
final result = new Map();
map.forEach((String k,v) { result[new Symbol(k)] = v; });
return result;
}