onboardingStepRoute function
- String? step
Map a learner onboarding_step value to its route.
'review_intro' and 'mastery_explained' are intentionally absent —
the standalone /onboarding/review and /onboarding/mastery screens
were both demoted to one-time contextual banners. The review explainer
now lives at the top of ReviewSessionScreen (see ReviewIntroSeen in
user_prefs_provider.dart); the mastery ladder lives at the top of
TopicTreeScreen (MasteryIntroSeen). Legacy users whose
profiles.onboarding_step still references either of those steps are
treated as fully onboarded — the home shell (`/`) is the destination.
Implementation
String onboardingStepRoute(String? step) {
return switch (step) {
'why_socratic' => '/onboarding/why',
'first_session' => '/onboarding/session',
'review_intro' => '/',
'mastery_explained' => '/',
_ => '/onboarding/welcome',
};
}