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<Symbol, dynamic>();
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<Symbol, dynamic> symbolizeKeys(Map<String, dynamic> map){
final result = new Map<Symbol, dynamic>();
map.forEach((String k,v) { result[new Symbol(k)] = v; });
return result;
}