Flutter UI Walkthrough — Login
What the shopper sees
A phone-number input (pre-filled +91 country code), a “Log In” button, and a link to switch to the signup screen instead. No password field exists anywhere in this flow.
What the shopper does here
- Enters their phone number.
- Taps “Log In” to receive an OTP code.
How it’s built
LoginSingleController.onPhoneChanged(unmaskedDigits) builds _phoneNumber as '+91$unmaskedDigits', the same hardcoded-country-code pattern PhoneSignupController uses. The controller carries only a single isSubmitting observable — no consent state exists here, since login never touches Terms/Privacy acceptance.
onLoginSubmit() guards on isSubmitting.value, then calls IPhoneAuthRepository.sendLoginOtp(_phoneNumber). Server-side, AuthService::send_login_otp rejects with a not-found (404) before generating any code if the phone number has no existing account — the inverse precondition of signup’s conflict check. On success, the controller navigates to the OTP-verify screen with just {phone: _phoneNumber, mode: 'login'} — no termsAccepted/version fields are passed, since OtpVerifyController’s login branch never reads them. onGoToSignup() navigates back to AppRoutes.phoneSignup for a shopper who landed here by mistake.
