setLastVisitedOnboardingPage method
- OnboardingPage page
⚠️ This reports the onboarding funnel, so it must stay AFTER consent.
It is today: the first call comes from the welcome page's tap handler,
which awaits setUserTracking(true) first. A new entry point that
navigated before that tap would report before consent.
Implementation
Future<void> setLastVisitedOnboardingPage(OnboardingPage page) async {
await _sharedPreferences.setInt(
_TAG_LAST_VISITED_ONBOARDING_PAGE,
page.index,
);
AnalyticsHelper.trackEvent(
AnalyticsEvent.onboardingPageVisited,
action: page.name,
);
notifyListeners();
}