currentProfile function

  1. @riverpod
Future<ProfileModel?> currentProfile(
  1. Ref<Object?> ref
)

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.

Implementation

@riverpod
Future<ProfileModel?> currentProfile(Ref ref) async {
  final ds = ref.watch(supabaseDatasourceProvider);
  return ds.getProfile();
}