Login Screen
features/shared/auth/login/presentation
Overview
Single screen offering email/phone + password, plus Google and Apple buttons. Listens to loginNotifierProvider for the per-method loading flags so each button can show its own spinner independently.
User Flow
- User picks auth method (email or phone) via AuthMethodNotifier.
- Enters credentials → submits → ref.read(loginNotifierProvider.notifier).login(...).
- loginNotifierProvider streams state — isPasswordLoading toggles the submit button spinner.
- On state.isAuthenticated the GoRouter redirect fires and navigates to /home.
- On state.error a SnackBar surfaces the unwrapped exception message.
Cases & Edge Cases
- Three independent loading flags (password / google / apple) prevent cross-method spinner flicker.
- Apple button is conditionally rendered on iOS only — Android shows Google only.
- Google cancellation must not surface as an error — the notifier returns false but leaves state.error null.
Code References
- lib/src/features/shared/auth/login/presentation/login.dart
- lib/src/features/shared/auth/login/presentation/widgets/google_sign_in_button.dart
- lib/src/features/shared/auth/login/presentation/widgets/apple_sign_in_button.dart
- lib/src/features/shared/auth/login/presentation/widgets/email_or_phone.dart
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
Phone-based password login is part of the UI toggle but the backend currently only supports email — picking 'phone' falls back to email validation messages.