I tried to make a default map parameter but it just goes errors for some reason,
var size = {
"width": 1920,
"height": 1080,
};
class MyClass {
myFunction([String MyParam = "Sup!", Map background_size = size]) async {
return background_size.width;
}
}
It only gives me an errors like this The default value of an optional parameter must be constant. Can someone tell me which lines I type wrong?