I am new to Dart and was expecting to get a compile-time error for the following code:
final Map screens = const {
"START": 'start_screen',
"QUESTIONS": 'questions_screen',
"RESULTS": 'result_screen',
};
...
activeScreen = screens['QUESTIONS1']!;
I know that I can use containsKey to find it a real time, but if my map is const, why cannot the Dart compiler find this code error?