I know you can do this for things like Strings, ints, but I'm wondering if you can set default values for more complex data types such as Maps. I've tried with the new keyword and a few other ways, but they all throw errors.
Default parameters have to be constants. You have to define your default values with the const
keyword.
m([p1 = const['a', 'b']]) => null;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With