presentation/providers/onboarding_provider library
Classes
- OnboardingSessionData
- Per-session UI state for onboarding — not persisted server-side. Reset on sign-out so the next session re-shows the invitation modal.
- OnboardingSessionState
Enums
- OnboardingStatus
-
Phases the first-connection flow can be in. The
OnboardingGatewidget redirects (or renders a modal) based on this status.
Properties
-
adminEligibleOrgsProvider
→ AutoDisposeFutureProvider<
List< OrganizationModel> > -
Orgs where the user is owner/admin — used by the admin-onboarding picker
and to auto-select when the user is admin of exactly one org.
final
-
currentProfileProvider
→ AutoDisposeFutureProvider<
ProfileModel?> -
Cached profile fetch used by the onboarding gate. Kept alive so the gate
does not re-fetch on every rebuild. Invalidated in main.dart on sign-out
and by screens that mutate onboarding state.
final
-
isOrgAdminProvider
→ AutoDisposeFutureProvider<
bool> -
Whether the current user is an owner/admin of any organization.
final
-
onboardingSessionStateProvider
→ NotifierProviderImpl<
OnboardingSessionState, OnboardingSessionData> -
See also OnboardingSessionState.
final
-
onboardingStateProvider
→ AutoDisposeFutureProvider<
OnboardingStatus> -
Resolves the current onboarding status for the signed-in user. The gate
watches this and redirects (or shows the invitation modal) accordingly.
final
Functions
-
adminEligibleOrgs(
Ref< Object?> ref) → Future<List< OrganizationModel> > - Orgs where the user is owner/admin — used by the admin-onboarding picker and to auto-select when the user is admin of exactly one org.
-
adminOnboardingStepRoute(
String? step, String orgId) → String -
Map an admin wizard step to its route.
orgIdis appended as a query parameter so each step screen can read it from the router state. -
currentProfile(
Ref< Object?> ref) → Future<ProfileModel?> - Cached profile fetch used by the onboarding gate. Kept alive so the gate does not re-fetch on every rebuild. Invalidated in main.dart on sign-out and by screens that mutate onboarding state.
-
isOrgAdmin(
Ref< Object?> ref) → Future<bool> - Whether the current user is an owner/admin of any organization.
-
onboardingState(
Ref< Object?> ref) → Future<OnboardingStatus> - Resolves the current onboarding status for the signed-in user. The gate watches this and redirects (or shows the invitation modal) accordingly.
-
onboardingStepRoute(
String? step) → String -
Map a learner
onboarding_stepvalue to its route.