masteryLevelFromString function
- String mastery
Translates the mastery string used across the app into a 0..5 level.
Public so the dashboard widgets can reuse it without redefining the map.
Implementation
int masteryLevelFromString(String mastery) => switch (mastery) {
'awareness' => 1,
'understanding' => 2,
'application' => 3,
'evaluation' => 4,
'mastery' => 5,
_ => 0,
};