I'm trying to write a config file and I have the following code:
const config = const Config();
class Config {
final Map<String, double> blur;
const Config({this.blur: const {'sigmaX': 50.0, 'sigmaY': 50.0}});
}
And I'm trying to use config.blur['sigmaX'] in another file for the use of ImageFilter like this:
filter: ImageFilter.blur(sigmaX: config.blur['sigmaX'], sigmaY: 50),
But I get the following error when I trying to build and run it:
The argument type 'double?' can't be assigned to the parameter type 'double'.
Null Safety is on.