MINOR-FIX: Localization Problem Resolve.

This commit is contained in:
2025-12-04 11:19:11 +05:00
parent e602782edd
commit 841cdf8c21
9 changed files with 69 additions and 49 deletions

View File

@@ -6,8 +6,6 @@
"forgotPassword": "Forgot Password", "forgotPassword": "Forgot Password",
"login": "Log in", "login": "Log in",
"orContinueWith": "or continue with", "orContinueWith": "or continue with",
"withGoogle": "with Google", "withGoogle": "with Google",
"withApple": "with Apple", "withApple": "with Apple",
"dontHaveAccount": "Didn't have an account?", "dontHaveAccount": "Didn't have an account?",
@@ -104,5 +102,22 @@
"youAreNotLoggedIn": "Youre not logged in. Please sign in to access your account and explore all features.", "youAreNotLoggedIn": "Youre not logged in. Please sign in to access your account and explore all features.",
"noOrderfound": "No order found", "noOrderfound": "No order found",
"reset_password_link_sent": "A reset link has been sent to {email}", "reset_password_link_sent": "A reset link has been sent to {email}",
"pay_amount": "Pay Amount: {amount}" "pay_amount": "Pay Amount: {amount}",
"otherServices": "Other Services",
"foodDelivery": "Food Delivery",
"delivery": "Delivery",
"bookingTaxi": "Booking \nTaxi",
"updateYourWardrobe": "Update your wardrobe",
"weDeliverSafely": "We deliver safely",
"rent": "Rent",
"hugeSelectionOfAds": "Huge selection of ads!",
"cosmetics": "Cosmetics",
"moreThan1000Products": "More than 1000 products",
"foodProducts": "Food products",
"enableLocation": "Enable Location for a Personalized Experience",
"allowLocation": "Allow location access to discover beauty stores and services near you.",
"useCurrentLocation": "Use current location",
"setFromMap": "Set from map",
"enterManuallyLocation": "Enter Manually location"
} }

View File

@@ -1,5 +1,5 @@
class ConstTexts { class ConstTexts {
static String loginToExplore = "logintoExplore"; static String loginToExplore = "loginToExplore";
static String emailAddress = "emailAddress"; static String emailAddress = "emailAddress";
static String password = "password"; static String password = "password";
static String enterPassword = "enterPassword"; static String enterPassword = "enterPassword";
@@ -60,9 +60,11 @@ class ConstTexts {
static String pleaseWait = "pleaseWait"; static String pleaseWait = "pleaseWait";
static String change = "change"; static String change = "change";
static String yourSosRequest = "yourSosRequest"; static String yourSosRequest = "yourSosRequest";
static String yourSosrequestAlreadySubmitted = "yourSosrequestAlreadySubmitted"; static String yourSosrequestAlreadySubmitted =
"yourSosrequestAlreadySubmitted";
static String payNow = "payNow"; static String payNow = "payNow";
static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance"; static String youDoNothaveSufficientwalletBalance =
"youDoNothaveSufficientwalletBalance";
static String somethingWentWrong = "somethingWentWrong"; static String somethingWentWrong = "somethingWentWrong";
static String cash = "cash"; static String cash = "cash";
static String coupon = "coupon"; static String coupon = "coupon";
@@ -102,21 +104,22 @@ class ConstTexts {
static String plsLoginToAcc = "plsLoginToAcc"; static String plsLoginToAcc = "plsLoginToAcc";
static String youAreNotLoggedIn = "youAreNotLoggedIn"; static String youAreNotLoggedIn = "youAreNotLoggedIn";
static String noOrderfound = "noOrderfound"; static String noOrderfound = "noOrderfound";
// static String yourSosrequestAlreadySubmitted = "yourSosrequestAlreadySubmitted"; static String otherServices = "otherServices";
// static String payNow = "payNow"; static String foodDelivery = "foodDelivery";
// static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance"; static String delivery = "delivery";
// static String somethingWentWrong = "somethingWentWrong"; static String bookingTaxi = "bookingTaxi";
// static String cash = "cash"; static String updateYourWardrobe = "updateYourWardrobe";
// static String coupon = "coupon"; static String weDeliverSafely = "weDeliverSafely";
// static String couponNotFound = "couponNotFound"; static String rent = "rent";
// static String tapToApply = "tapToApply"; static String hugeSelectionOfAds = "hugeSelectionOfAds";
// static String home = "home"; static String cosmetics = "cosmetics";
// static String myBookings = "myBookings"; static String moreThan1000Products = "moreThan1000Products";
// static String profile = "profile"; static String foodProducts = "foodProducts";
// static String wallet = "wallet"; static String enableLocation = "enableLocation";
// static String cabServiceType = "cabServiceType"; static String allowLocation = "allowLocation";
// static String everyRideVerified = "everyRideVerified"; static String useCurrentLocation = "useCurrentLocation";
// static String allDriversIDCheck = "allDriversIDCheck"; static String setFromMap = "setFromMap";
static String enterManuallyLocation = "enterManuallyLocation";
// static String intercity = "intercity"; // static String intercity = "intercity";
// static String aroundTheCity = "aroundTheCity"; // static String aroundTheCity = "aroundTheCity";
// static String rideDetails = "rideDetails"; // static String rideDetails = "rideDetails";

View File

@@ -13,8 +13,6 @@ import 'controllers/global_setting_controller.dart';
import 'controllers/theme_controller.dart'; import 'controllers/theme_controller.dart';
import 'firebase_options.dart'; import 'firebase_options.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized(); await EasyLocalization.ensureInitialized();
@@ -30,6 +28,7 @@ void main() async {
runApp( runApp(
EasyLocalization( EasyLocalization(
startLocale: Locale('en', 'US'),
supportedLocales: [ supportedLocales: [
Locale('en', 'US'), Locale('en', 'US'),
Locale('uz', 'UZ'), Locale('uz', 'UZ'),

View File

@@ -273,7 +273,7 @@ class LoginScreen extends StatelessWidget {
child: Center( child: Center(
child: Text.rich( child: Text.rich(
TextSpan( TextSpan(
text: ConstTexts.dontHaveAccount.tr(), text: "${ConstTexts.dontHaveAccount.tr()} ",
style: AppThemeData.mediumTextStyle( style: AppThemeData.mediumTextStyle(
color: color:
isDark isDark

View File

@@ -257,7 +257,7 @@ class MobileLoginScreen extends StatelessWidget {
child: Center( child: Center(
child: Text.rich( child: Text.rich(
TextSpan( TextSpan(
text: ConstTexts.dontHaveAccount.tr(), text: "${ConstTexts.dontHaveAccount.tr()} ",
style: AppThemeData.mediumTextStyle( style: AppThemeData.mediumTextStyle(
color: color:
isDark isDark

View File

@@ -200,7 +200,7 @@ class OtpVerificationScreen extends StatelessWidget {
child: Center( child: Center(
child: Text.rich( child: Text.rich(
TextSpan( TextSpan(
text: ConstTexts.dontHaveAccount.tr(), text: "${ConstTexts.dontHaveAccount.tr()} ",
style: AppThemeData.mediumTextStyle( style: AppThemeData.mediumTextStyle(
color: color:
isDark isDark

View File

@@ -1,3 +1,4 @@
import 'package:customer/constant/const_texts.dart';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/theme_controller.dart'; import 'package:customer/controllers/theme_controller.dart';
import 'package:customer/models/user_model.dart'; import 'package:customer/models/user_model.dart';
@@ -39,9 +40,9 @@ class LocationPermissionScreen extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 25), padding: const EdgeInsets.symmetric(horizontal: 25),
child: Text( child: Text(
"Enable Location for a Personalized Experience".tr(), ConstTexts.enableLocation.tr(),
style: AppThemeData.boldTextStyle( style: AppThemeData.boldTextStyle(
fontSize: 24, fontSize: 24.sp,
color: color:
isDark isDark
? AppThemeData.greyDark900 ? AppThemeData.greyDark900
@@ -54,10 +55,9 @@ class LocationPermissionScreen extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 50), padding: const EdgeInsets.symmetric(horizontal: 50),
child: Text( child: Text(
"Allow location access to discover beauty stores and services near you." ConstTexts.allowLocation.tr(),
.tr(),
style: AppThemeData.mediumTextStyle( style: AppThemeData.mediumTextStyle(
fontSize: 14, fontSize: 16.sp,
color: color:
isDark isDark
? AppThemeData.greyDark600 ? AppThemeData.greyDark600
@@ -69,7 +69,8 @@ class LocationPermissionScreen extends StatelessWidget {
const SizedBox(height: 30), const SizedBox(height: 30),
RoundedButtonFill( RoundedButtonFill(
borderRadius: 10.r, borderRadius: 10.r,
title: "Use current location".tr(), fontSizes: 14.sp,
title: ConstTexts.useCurrentLocation.tr(),
onPress: () async { onPress: () async {
Constant.checkPermission( Constant.checkPermission(
context: context, context: context,
@@ -137,7 +138,8 @@ class LocationPermissionScreen extends StatelessWidget {
const SizedBox(height: 10), const SizedBox(height: 10),
RoundedButtonFill( RoundedButtonFill(
borderRadius: 10.r, borderRadius: 10.r,
title: "Set from map".tr(), fontSizes: 14.sp,
title: ConstTexts.setFromMap.tr(),
onPress: () async { onPress: () async {
Constant.checkPermission( Constant.checkPermission(
context: context, context: context,
@@ -230,9 +232,9 @@ class LocationPermissionScreen extends StatelessWidget {
}); });
}, },
child: Text( child: Text(
"Enter Manually location".tr(), ConstTexts.enterManuallyLocation.tr(),
style: AppThemeData.semiBoldTextStyle( style: AppThemeData.semiBoldTextStyle(
fontSize: 16, fontSize: 16.sp,
color: color:
isDark isDark
? AppThemeData.greyDark900 ? AppThemeData.greyDark900

View File

@@ -1,5 +1,7 @@
import 'dart:developer'; import 'dart:developer';
import 'package:customer/constant/const_texts.dart';
import 'package:customer/models/section_model.dart'; import 'package:customer/models/section_model.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Trans; import 'package:get/get.dart' hide Trans;
@@ -66,7 +68,7 @@ class ServiceListScreen extends StatelessWidget {
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 16.r), padding: EdgeInsets.symmetric(horizontal: 16.r),
child: Text( child: Text(
"Other Services", ConstTexts.otherServices.tr(),
style: TextStyle( style: TextStyle(
fontFamily: AppThemeData.bold, fontFamily: AppThemeData.bold,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@@ -80,23 +82,23 @@ class ServiceListScreen extends StatelessWidget {
// Other Services Section // Other Services Section
_otherServicesCardMaker( _otherServicesCardMaker(
image: "assets/images/garderob_img.png", image: "assets/images/garderob_img.png",
title: "Обновить гардероб", title: ConstTexts.updateYourWardrobe.tr(),
subtitle: "Доставляем безопасно", subtitle: ConstTexts.weDeliverSafely.tr(),
), ),
_otherServicesCardMaker( _otherServicesCardMaker(
image: "assets/images/keys_img.png", image: "assets/images/keys_img.png",
title: "Аренда", title: ConstTexts.rent.tr(),
subtitle: "Огромный выбор объявлений!", subtitle: ConstTexts.hugeSelectionOfAds.tr(),
), ),
_otherServicesCardMaker( _otherServicesCardMaker(
image: "assets/images/cosmetics_img.png", image: "assets/images/cosmetics_img.png",
title: "Косметика", title: ConstTexts.cosmetics.tr(),
subtitle: "Более 1000 товаров", subtitle: ConstTexts.moreThan1000Products.tr(),
), ),
_otherServicesCardMaker( _otherServicesCardMaker(
image: "assets/images/products_img.png", image: "assets/images/products_img.png",
title: "Продукты питания", title: ConstTexts.foodProducts.tr(),
subtitle: "Более 1000 товаров", subtitle: ConstTexts.moreThan1000Products.tr(),
), ),
SizedBox(height: 45.h), SizedBox(height: 45.h),
], ],
@@ -207,7 +209,7 @@ class ServiceListScreen extends StatelessWidget {
spacing: 12.r, spacing: 12.r,
children: [ children: [
_mainCardsMaker( _mainCardsMaker(
title: "Food Delivery", title: ConstTexts.foodDelivery.tr(),
image: "assets/images/food_img.png", image: "assets/images/food_img.png",
// onTap: () { // onTap: () {
// log("Main Card Tapped"); // log("Main Card Tapped");
@@ -225,7 +227,7 @@ class ServiceListScreen extends StatelessWidget {
// }, // },
), ),
_mainCardsMaker( _mainCardsMaker(
title: "Delivery", title: ConstTexts.delivery.tr(),
image: "assets/images/delivery_img.png", image: "assets/images/delivery_img.png",
onTap: () { onTap: () {
log("Main Card Tapped"); log("Main Card Tapped");
@@ -274,7 +276,7 @@ class ServiceListScreen extends StatelessWidget {
Expanded( Expanded(
child: Text( child: Text(
maxLines: 2, maxLines: 2,
"Booking Taxi", ConstTexts.bookingTaxi.tr(),
style: TextStyle( style: TextStyle(
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
fontFamily: AppThemeData.bold, fontFamily: AppThemeData.bold,
@@ -348,7 +350,7 @@ class ServiceListScreen extends StatelessWidget {
style: TextStyle( style: TextStyle(
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
fontFamily: AppThemeData.bold, fontFamily: AppThemeData.bold,
fontSize: 14.sp, fontSize: 15.sp,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: AppThemeData.darkGrey, color: AppThemeData.darkGrey,
), ),

View File

@@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart' hide Trans; import 'package:get/get.dart' hide Trans;
import '../../constant/assets.dart';
import '../../controllers/splash_controller.dart'; import '../../controllers/splash_controller.dart';
import '../../themes/app_them_data.dart'; import '../../themes/app_them_data.dart';