isLoggedIn Provider
provider/provider.dart · FutureProvider<bool>
Overview
Convenience FutureProvider that reads isLoggedIn from AuthStorageService once. Most of the shell uses authStateProvider directly; this provider is here for places that want a Future<bool> rather than a live AuthState.
User Flow
- authStorageProvider exposes AuthStorageService() (re-instantiated per provider build).
- isLoggedInProvider reads it and forwards AuthStorageService.isLoggedIn().
- Future resolves once; the provider caches the result until ref.invalidate.
Cases & Edge Cases
- Stale after logout — code that consumes this must invalidate or prefer authStateProvider for live updates.
- Returns false for the (logged in but tokens cleared) edge case because isLoggedIn flag is what's checked, not the tokens themselves.
Code References
- lib/src/features/shared/home/provider/provider.dart:11 // authStorageProvider
- lib/src/features/shared/home/provider/provider.dart:15 // isLoggedInProvider
- lib/src/core/services/auth_storage.dart:81 // isLoggedIn
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
Duplicates a slice of AuthStateNotifier's responsibility — keep only one source of truth in new code.