feat: splash page done

This commit is contained in:
jahongireshonqulov
2025-10-31 12:29:30 +05:00
parent ab1ac6e6fa
commit 077ea23416
229 changed files with 3187 additions and 13517 deletions

View File

@@ -1,12 +1,6 @@
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';
import 'package:food_delivery_client/feature/auth/presentation/pages/reset_password_page/reset_password_page.dart';
import 'package:food_delivery_client/feature/auth/presentation/pages/verify_otp_code_page/verify_otp_code_page.dart';
import 'package:food_delivery_client/feature/auth/presentation/pages/verify_phone_number_page/verify_phone_page.dart';
import 'package:food_delivery_client/feature/home/presentation/pages/restaurants_by_category_page/restaurants_by_category_page.dart';
import 'package:food_delivery_client/feature/onboarding/presentation/pages/onboarding_page/onboarding_page.dart';
import 'package:food_delivery_client/feature/onboarding/presentation/pages/splash_page/splash_page.dart';
import '../../food_delivery_client.dart';
@@ -18,67 +12,13 @@ class AppRoutes {
navigatorKey: navigatorKey,
initialLocation: Routes.splash,
routes: [
GoRoute(path: Routes.splash, builder: (context, state) => SplashPage()),
GoRoute(
path: Routes.login,
pageBuilder: (context, state) => CupertinoPage(child: LoginPage()),
),
GoRoute(
path: Routes.register,
pageBuilder: (context, state) => CupertinoPage(
child: RegisterPage(phoneNumber: state.extra as String),
),
path: Routes.splash,
pageBuilder: (context, state) => CupertinoPage(child: SplashPage()),
),
GoRoute(
path: Routes.forgotPassword,
pageBuilder: (context, state) =>
CupertinoPage(child: ForgotPasswordPage()),
),
GoRoute(
path: Routes.verifyPhoneNumber,
pageBuilder: (context, state) => CupertinoPage(
child: VerifyPhoneNumberPage(isRegister: state.extra as bool),
),
),
GoRoute(
path: Routes.verifyOtpCode,
pageBuilder: (context, state) => CupertinoPage(
child: VerifyOtpCodePage(params: state.extra as OtpCodePageParams),
),
),
GoRoute(
path: Routes.resetPassword,
pageBuilder: (context, state) => CupertinoPage(
child: ResetPasswordPage(phoneNumber: state.extra as String),
),
),
GoRoute(
path: Routes.main,
pageBuilder: (context, state) => CupertinoPage(child: MainPage()),
),
GoRoute(
path: Routes.categories,
pageBuilder: (context, state) => CupertinoPage(child: CategoriesPage()),
),
GoRoute(
path: Routes.filters,
pageBuilder: (context, state) => CupertinoPage(
child: FiltersPage(homeBloc: state.extra as HomeBloc),
),
),
GoRoute(
path: Routes.restaurantsByCategory,
pageBuilder: (context, state) => CupertinoPage(
child: RestaurantsByCategoryPage(categoryName: state.extra as String),
),
),
GoRoute(
path: Routes.browse,
pageBuilder: (context, state) => CupertinoPage(child: BrowsePage()),
path: Routes.onBoarding,
pageBuilder: (context, state) => CupertinoPage(child: OnboardingPage()),
),
],
);

View File

@@ -1,5 +1,6 @@
abstract class Routes {
static const String splash = '/splash';
static const String onBoarding = '/onboarding';
static const String login = '/login';
static const String register = '/register';
static const String main = '/main';