I am assigning a variable stringFn of type Function(String) like :
Function(String) stringFn = (String? s) {};
The dart static type checking does not give an error even though the stringFn is assigned a function that can receive a nullable parameter.
Printing the runtimeType of stringFn results in (String?) => Null but if I call the function :
stringFn(null);
results in The argument type 'Null' can't be assigned to the parameter type 'String' which I agree because the type does not allow nullable parameter.
Am I missing something here ?