feat:mai page done
This commit is contained in:
@@ -13,6 +13,31 @@ import 'package:dio/dio.dart' as _i361;
|
||||
import 'package:get_it/get_it.dart' as _i174;
|
||||
import 'package:injectable/injectable.dart' as _i526;
|
||||
|
||||
import '../../feature/auth/data/datasource/auth_datasource.dart' as _i246;
|
||||
import '../../feature/auth/data/repository/auth_repository_impl.dart' as _i648;
|
||||
import '../../feature/auth/domain/repository/auth_repository.dart' as _i884;
|
||||
import '../../feature/auth/domain/usecases/login_usecase.dart' as _i241;
|
||||
import '../../feature/auth/domain/usecases/register_usecase.dart' as _i607;
|
||||
import '../../feature/auth/domain/usecases/reset_password_usecase.dart'
|
||||
as _i694;
|
||||
import '../../feature/auth/domain/usecases/verify_otp_code_login_usecase.dart'
|
||||
as _i318;
|
||||
import '../../feature/auth/domain/usecases/verify_otp_code_register_usecase.dart'
|
||||
as _i406;
|
||||
import '../../feature/auth/domain/usecases/verify_phone_login_usecase.dart'
|
||||
as _i801;
|
||||
import '../../feature/auth/domain/usecases/verify_phone_register_usecase.dart'
|
||||
as _i664;
|
||||
import '../../feature/auth/presentation/blocs/login_bloc/login_bloc.dart'
|
||||
as _i1065;
|
||||
import '../../feature/auth/presentation/blocs/register_bloc/register_bloc.dart'
|
||||
as _i1050;
|
||||
import '../../feature/auth/presentation/blocs/reset_password_bloc/reset_password_bloc.dart'
|
||||
as _i97;
|
||||
import '../../feature/auth/presentation/blocs/verify_otp_bloc/verify_otp_bloc.dart'
|
||||
as _i323;
|
||||
import '../../feature/auth/presentation/blocs/verify_phone_bloc/verify_phone_bloc.dart'
|
||||
as _i224;
|
||||
import '../../feature/common/presentation/blocs/language_bloc/language_bloc.dart'
|
||||
as _i942;
|
||||
import '../../feature/main/presentation/blocs/main_bloc/main_bloc.dart'
|
||||
@@ -47,6 +72,63 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
gh.singleton<_i354.RequestHandlerService>(
|
||||
() => _i354.RequestHandlerService(gh<_i361.Dio>()),
|
||||
);
|
||||
gh.lazySingleton<_i246.AuthDatasource>(
|
||||
() => _i246.AuthDatasourceImpl(gh<_i354.RequestHandlerService>()),
|
||||
);
|
||||
gh.lazySingleton<_i884.AuthRepository>(
|
||||
() => _i648.AuthRepositoryImpl(
|
||||
gh<_i354.RequestHandlerService>(),
|
||||
gh<_i246.AuthDatasource>(),
|
||||
),
|
||||
);
|
||||
gh.factory<_i607.RegisterUseCase>(
|
||||
() => _i607.RegisterUseCase(gh<_i884.AuthRepository>()),
|
||||
);
|
||||
gh.factory<_i241.LoginUseCase>(
|
||||
() => _i241.LoginUseCase(gh<_i884.AuthRepository>()),
|
||||
);
|
||||
gh.factory<_i694.ResetPasswordUseCase>(
|
||||
() => _i694.ResetPasswordUseCase(gh<_i884.AuthRepository>()),
|
||||
);
|
||||
gh.factory<_i318.VerifyOtpCodeForgotPasswordUseCase>(
|
||||
() =>
|
||||
_i318.VerifyOtpCodeForgotPasswordUseCase(gh<_i884.AuthRepository>()),
|
||||
);
|
||||
gh.factory<_i801.VerifyPhoneNumberLoginUseCase>(
|
||||
() => _i801.VerifyPhoneNumberLoginUseCase(gh<_i884.AuthRepository>()),
|
||||
);
|
||||
gh.factory<_i664.VerifyPhoneRegisterUseCase>(
|
||||
() => _i664.VerifyPhoneRegisterUseCase(gh<_i884.AuthRepository>()),
|
||||
);
|
||||
gh.factory<_i406.VerifyOtpCodeRegisterUseCase>(
|
||||
() => _i406.VerifyOtpCodeRegisterUseCase(gh<_i884.AuthRepository>()),
|
||||
);
|
||||
gh.factory<_i323.VerifyOtpBloc>(
|
||||
() => _i323.VerifyOtpBloc(
|
||||
gh<_i406.VerifyOtpCodeRegisterUseCase>(),
|
||||
gh<_i318.VerifyOtpCodeForgotPasswordUseCase>(),
|
||||
gh<_i664.VerifyPhoneRegisterUseCase>(),
|
||||
gh<_i801.VerifyPhoneNumberLoginUseCase>(),
|
||||
),
|
||||
);
|
||||
gh.factory<_i224.VerifyPhoneBloc>(
|
||||
() => _i224.VerifyPhoneBloc(
|
||||
gh<_i801.VerifyPhoneNumberLoginUseCase>(),
|
||||
gh<_i664.VerifyPhoneRegisterUseCase>(),
|
||||
),
|
||||
);
|
||||
gh.factory<_i1050.RegisterBloc>(
|
||||
() => _i1050.RegisterBloc(gh<_i607.RegisterUseCase>()),
|
||||
);
|
||||
gh.factory<_i97.ResetPasswordBloc>(
|
||||
() => _i97.ResetPasswordBloc(gh<_i694.ResetPasswordUseCase>()),
|
||||
);
|
||||
gh.factory<_i1065.LoginBloc>(
|
||||
() => _i1065.LoginBloc(
|
||||
gh<_i241.LoginUseCase>(),
|
||||
gh<_i321.StorageService>(),
|
||||
),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +249,36 @@ abstract class AppLocalizations {
|
||||
/// In en, this message translates to:
|
||||
/// **'Register'**
|
||||
String get register;
|
||||
|
||||
/// No description provided for @home.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Home'**
|
||||
String get home;
|
||||
|
||||
/// No description provided for @discover.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Discover'**
|
||||
String get discover;
|
||||
|
||||
/// No description provided for @cart.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Cart'**
|
||||
String get cart;
|
||||
|
||||
/// No description provided for @transactions.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Transactions'**
|
||||
String get transactions;
|
||||
|
||||
/// No description provided for @profile.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Profile'**
|
||||
String get profile;
|
||||
}
|
||||
|
||||
class _AppLocalizationsDelegate
|
||||
|
||||
@@ -90,4 +90,19 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get register => 'Register';
|
||||
|
||||
@override
|
||||
String get home => 'Home';
|
||||
|
||||
@override
|
||||
String get discover => 'Discover';
|
||||
|
||||
@override
|
||||
String get cart => 'Cart';
|
||||
|
||||
@override
|
||||
String get transactions => 'Transactions';
|
||||
|
||||
@override
|
||||
String get profile => 'Profile';
|
||||
}
|
||||
|
||||
@@ -88,4 +88,19 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get register => 'Зарегистрироваться';
|
||||
|
||||
@override
|
||||
String get home => 'Главная';
|
||||
|
||||
@override
|
||||
String get discover => 'Обзор';
|
||||
|
||||
@override
|
||||
String get cart => 'Корзина';
|
||||
|
||||
@override
|
||||
String get transactions => 'Транзакции';
|
||||
|
||||
@override
|
||||
String get profile => 'Профиль';
|
||||
}
|
||||
|
||||
@@ -88,4 +88,19 @@ class AppLocalizationsUz extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get register => 'Ro‘yxatdan o‘tish';
|
||||
|
||||
@override
|
||||
String get home => 'Bosh sahifa';
|
||||
|
||||
@override
|
||||
String get discover => 'Kashf etish';
|
||||
|
||||
@override
|
||||
String get cart => 'Savat';
|
||||
|
||||
@override
|
||||
String get transactions => 'Tranzaksiyalar';
|
||||
|
||||
@override
|
||||
String get profile => 'Profil';
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:food_delivery_client/feature/auth/presentation/login_page/login_page.dart';
|
||||
import 'package:food_delivery_client/feature/auth/presentation/pages/login_page/login_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';
|
||||
|
||||
@@ -26,6 +26,10 @@ class AppRoutes {
|
||||
path: Routes.login,
|
||||
pageBuilder: (context, state) => CupertinoPage(child: LoginPage()),
|
||||
),
|
||||
GoRoute(
|
||||
path: Routes.main,
|
||||
pageBuilder: (context, state) => CupertinoPage(child: MainPage()),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -54,5 +54,7 @@ abstract class AppColors {
|
||||
static const Color cE2E4EA = Color(0xFFE2E4EA);
|
||||
static const Color cA7AEC1 = Color(0xFFA7AEC1);
|
||||
static const Color c151B33 = Color(0xFF151B33);
|
||||
static const Color cE5E7EB = Color(0xFFE5E7EB);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,17 +7,34 @@ abstract class AppIcons {
|
||||
static const String icLogin = "$baseUrl/ic_login.svg";
|
||||
static const String icVisibility = "$baseUrl/ic_visibility.svg";
|
||||
static const String icVisibilityOff = "$baseUrl/ic_visibility_off.svg";
|
||||
|
||||
static const String icHome = "$baseUrl/ic_home.svg";
|
||||
static const String icDiscover = "$baseUrl/ic_discover.svg";
|
||||
static const String icCart = "$baseUrl/ic_cart.svg";
|
||||
static const String icCart1 = "$baseUrl/ic_cart1.svg";
|
||||
static const String icTransactions = "$baseUrl/ic_transactions.svg";
|
||||
static const String icProfile = "$baseUrl/ic_profile.svg";
|
||||
}
|
||||
|
||||
abstract class AppLightSvgs {
|
||||
static const String baseUrl = "assets/icons/light";
|
||||
static const String icSplash = "$baseUrl/ic_splash.svg";
|
||||
static const String icArrowLeft = "$baseUrl/ic_arrow_left.svg";
|
||||
static const String icHome = "$baseUrl/ic_home.svg";
|
||||
static const String icDiscover = "$baseUrl/ic_discover.svg";
|
||||
static const String icCart = "$baseUrl/ic_cart.svg";
|
||||
static const String icCart1 = "$baseUrl/ic_cart1.svg";
|
||||
static const String icTransactions = "$baseUrl/ic_transactions.svg";
|
||||
static const String icProfile = "$baseUrl/ic_profile.svg";
|
||||
}
|
||||
|
||||
abstract class AppDarkSvgs {
|
||||
static const String baseUrl = "assets/icons/dark";
|
||||
static const String icSplash = "$baseUrl/ic_splash.svg";
|
||||
static const String icArrowLeft = "$baseUrl/ic_arrow_left.svg";
|
||||
static const String icHome = "$baseUrl/ic_home.svg";
|
||||
static const String icDiscover = "$baseUrl/ic_discover.svg";
|
||||
static const String icCart = "$baseUrl/ic_cart.svg";
|
||||
static const String icCart1 = "$baseUrl/ic_cart1.svg";
|
||||
static const String icTransactions = "$baseUrl/ic_transactions.svg";
|
||||
static const String icProfile = "$baseUrl/ic_profile.svg";
|
||||
}
|
||||
|
||||
@@ -46,17 +46,17 @@ abstract class AppTheme {
|
||||
),
|
||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||
elevation: 0,
|
||||
showSelectedLabels: true,
|
||||
showUnselectedLabels: true,
|
||||
showSelectedLabels: false,
|
||||
showUnselectedLabels: false,
|
||||
backgroundColor: AppColors.cFFFFFF,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
unselectedItemColor: AppColors.cB5B5B5,
|
||||
selectedItemColor: AppColors.c000000,
|
||||
selectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
||||
color: Colors.red,
|
||||
unselectedItemColor: AppColors.cA9A9A9,
|
||||
selectedItemColor: AppColors.cFF6F00,
|
||||
selectedLabelStyle: AppTextStyles.size12Medium.copyWith(
|
||||
color: AppColors.cFF6F00,
|
||||
),
|
||||
unselectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
||||
color: AppColors.c000000,
|
||||
color: AppColors.cA9A9A9,
|
||||
),
|
||||
// unselectedLabelStyle: AppTextStyles.size14Medium.copyWith(
|
||||
// color: AppColors.c888888,
|
||||
@@ -138,17 +138,17 @@ abstract class AppTheme {
|
||||
),
|
||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||
elevation: 0,
|
||||
showSelectedLabels: true,
|
||||
showUnselectedLabels: true,
|
||||
backgroundColor: AppColors.cFFFFFF,
|
||||
showSelectedLabels: false,
|
||||
showUnselectedLabels: false,
|
||||
backgroundColor: AppColors.c131720,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
unselectedItemColor: AppColors.cB5B5B5,
|
||||
selectedItemColor: AppColors.c000000,
|
||||
selectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
||||
color: Colors.red,
|
||||
unselectedItemColor: AppColors.c626262,
|
||||
selectedItemColor: AppColors.cFF6F00,
|
||||
selectedLabelStyle: AppTextStyles.size12Medium.copyWith(
|
||||
color: AppColors.cFF6F00,
|
||||
),
|
||||
unselectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
||||
color: AppColors.c000000,
|
||||
unselectedLabelStyle: AppTextStyles.size12Medium.copyWith(
|
||||
color: AppColors.c626262,
|
||||
),
|
||||
// unselectedLabelStyle: AppTextStyles.size14Medium.copyWith(
|
||||
// color: AppColors.c888888,
|
||||
|
||||
@@ -8,6 +8,10 @@ class AppThemeColors extends ThemeExtension<AppThemeColors> {
|
||||
final Color buttonInactiveColor;
|
||||
final Color borderColor;
|
||||
final Color inActiveColor;
|
||||
final Color inActiveColor1;
|
||||
final Color inActiveColor2;
|
||||
|
||||
|
||||
|
||||
AppThemeColors({
|
||||
required this.onBoardingColor,
|
||||
@@ -16,6 +20,9 @@ class AppThemeColors extends ThemeExtension<AppThemeColors> {
|
||||
required this.buttonInactiveColor,
|
||||
required this.borderColor,
|
||||
required this.inActiveColor,
|
||||
required this.inActiveColor1,
|
||||
required this.inActiveColor2,
|
||||
|
||||
});
|
||||
|
||||
static AppThemeColors light = AppThemeColors(
|
||||
@@ -25,6 +32,8 @@ class AppThemeColors extends ThemeExtension<AppThemeColors> {
|
||||
iconColor: AppColors.cFFFFFF,
|
||||
borderColor: AppColors.cE2E4EA,
|
||||
inActiveColor: AppColors.cE2E4EA,
|
||||
inActiveColor1: AppColors.cA9A9A9,
|
||||
inActiveColor2: AppColors.cE5E7EB
|
||||
);
|
||||
|
||||
static AppThemeColors dark = AppThemeColors(
|
||||
@@ -34,6 +43,8 @@ class AppThemeColors extends ThemeExtension<AppThemeColors> {
|
||||
iconColor: AppColors.c131720,
|
||||
borderColor: AppColors.c292F3D,
|
||||
inActiveColor: AppColors.c292F3D,
|
||||
inActiveColor1: AppColors.c626262,
|
||||
inActiveColor2: AppColors.c292F3D
|
||||
);
|
||||
|
||||
@override
|
||||
@@ -44,6 +55,9 @@ class AppThemeColors extends ThemeExtension<AppThemeColors> {
|
||||
Color? buttonInactiveColor,
|
||||
Color? borderColor,
|
||||
Color? inActiveColor,
|
||||
Color? inActiveColor1,
|
||||
Color? inActiveColor2,
|
||||
|
||||
}) {
|
||||
return AppThemeColors(
|
||||
onBoardingColor: onBoardingColor ?? this.onBoardingColor,
|
||||
@@ -52,6 +66,8 @@ class AppThemeColors extends ThemeExtension<AppThemeColors> {
|
||||
buttonInactiveColor: buttonInactiveColor ?? this.buttonInactiveColor,
|
||||
borderColor: borderColor ?? this.borderColor,
|
||||
inActiveColor: inActiveColor ?? this.inActiveColor,
|
||||
inActiveColor1: inActiveColor1 ?? this.inActiveColor1,
|
||||
inActiveColor2: inActiveColor2??this.inActiveColor2
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,27 +4,66 @@ import 'package:food_delivery_client/core/core.dart';
|
||||
class AppThemeIcons extends ThemeExtension<AppThemeIcons> {
|
||||
final String icSplash;
|
||||
final String icArrowLeft;
|
||||
final String icHome;
|
||||
final String icDiscover;
|
||||
final String icCart;
|
||||
final String icCart1;
|
||||
final String icTransactions;
|
||||
final String icProfile;
|
||||
|
||||
AppThemeIcons({required this.icSplash, required this.icArrowLeft});
|
||||
AppThemeIcons({
|
||||
required this.icSplash,
|
||||
required this.icArrowLeft,
|
||||
required this.icHome,
|
||||
required this.icDiscover,
|
||||
required this.icCart,
|
||||
required this.icTransactions,
|
||||
required this.icProfile,
|
||||
required this.icCart1,
|
||||
});
|
||||
|
||||
static AppThemeIcons light = AppThemeIcons(
|
||||
icSplash: AppLightSvgs.icSplash,
|
||||
icArrowLeft: AppLightSvgs.icArrowLeft,
|
||||
icHome: AppLightSvgs.icHome,
|
||||
icDiscover: AppLightSvgs.icDiscover,
|
||||
icCart: AppLightSvgs.icCart,
|
||||
icTransactions: AppLightSvgs.icTransactions,
|
||||
icProfile: AppLightSvgs.icProfile,
|
||||
icCart1: AppLightSvgs.icCart1,
|
||||
);
|
||||
|
||||
static AppThemeIcons dark = AppThemeIcons(
|
||||
icSplash: AppDarkSvgs.icSplash,
|
||||
icArrowLeft: AppDarkSvgs.icArrowLeft,
|
||||
icHome: AppDarkSvgs.icHome,
|
||||
icDiscover: AppDarkSvgs.icDiscover,
|
||||
icCart: AppDarkSvgs.icCart,
|
||||
icTransactions: AppDarkSvgs.icTransactions,
|
||||
icProfile: AppDarkSvgs.icProfile,
|
||||
icCart1: AppDarkSvgs.icCart1,
|
||||
);
|
||||
|
||||
@override
|
||||
ThemeExtension<AppThemeIcons> copyWith({
|
||||
String? icSplash,
|
||||
String? icArrowLeft,
|
||||
String? icHome,
|
||||
String? icDiscover,
|
||||
String? icCart,
|
||||
String? icCart1,
|
||||
String? icTransactions,
|
||||
String? icProfile,
|
||||
}) {
|
||||
return AppThemeIcons(
|
||||
icSplash: icSplash ?? this.icSplash,
|
||||
icArrowLeft: icArrowLeft ?? this.icArrowLeft,
|
||||
icHome: icHome ?? this.icHome,
|
||||
icDiscover: icDiscover ?? this.icDiscover,
|
||||
icCart: icCart ?? this.icCart,
|
||||
icTransactions: icTransactions ?? this.icTransactions,
|
||||
icProfile: icProfile ?? this.icProfile,
|
||||
icCart1: icCart ?? this.icCart1,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import '../../food_delivery_client.dart';
|
||||
|
||||
abstract class AppUtils {
|
||||
static const Gradient kGradient = LinearGradient(
|
||||
begin: AlignmentGeometry.bottomCenter,
|
||||
end: AlignmentGeometry.topCenter,
|
||||
end: AlignmentGeometry.bottomCenter,
|
||||
begin: AlignmentGeometry.topCenter,
|
||||
colors: [AppColors.cFF6F00, AppColors.cFFAB40],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user