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 OnboardingGate widget 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. orgId is 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_step value to its route.

Typedefs

AdminEligibleOrgsRef = AutoDisposeFutureProviderRef<List<OrganizationModel>>
CurrentProfileRef = AutoDisposeFutureProviderRef<ProfileModel?>
IsOrgAdminRef = AutoDisposeFutureProviderRef<bool>
OnboardingStateRef = AutoDisposeFutureProviderRef<OnboardingStatus>