in defining a function in Dart, how to set an argument's default to { }, ie, an empty Map?
The default value must be a compile time constant, so 'const {}' will keep the compiler happy, but possibly not your function.
If you want a new modifiable map for each call, you can't use a default value on the function parameter. That same value is used for every call to the function, so you can't get a new value for each call that way.To create a new object each time the function is called, you have to do it in the function itself. The typical way is:
void func(String arg1, [Map args]) { if (args == null) args = {}; ...}