feat: sending otp and resend otp done

This commit is contained in:
jahongireshonqulov
2025-10-29 20:20:06 +05:00
parent d31b68cde2
commit eb7459c13f
19 changed files with 591 additions and 78 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/cupertino.dart';
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_otp_code_login_usecase.dart';
import 'package:food_delivery_client/feature/auth/presentation/pages/forgot_password_page/forgot_password_page.dart';
import 'package:food_delivery_client/feature/auth/presentation/pages/login_page/login_page.dart';
import 'package:food_delivery_client/feature/auth/presentation/pages/register_page/register_page.dart';
@@ -25,7 +26,9 @@ class AppRoutes {
GoRoute(
path: Routes.register,
pageBuilder: (context, state) => CupertinoPage(child: RegisterPage()),
pageBuilder: (context, state) => CupertinoPage(
child: RegisterPage(phoneNumber: state.extra as String),
),
),
GoRoute(
path: Routes.forgotPassword,
@@ -42,14 +45,15 @@ class AppRoutes {
GoRoute(
path: Routes.verifyOtpCode,
pageBuilder: (context, state) => CupertinoPage(
child: VerifyOtpCodePage(isRegister: state.extra as bool),
child: VerifyOtpCodePage(params: state.extra as OtpCodePageParams),
),
),
GoRoute(
path: Routes.resetPassword,
pageBuilder: (context, state) =>
CupertinoPage(child: ResetPasswordPage()),
pageBuilder: (context, state) => CupertinoPage(
child: ResetPasswordPage(phoneNumber: state.extra as String),
),
),
GoRoute(