abdusalom0516/base/home-screen #1

Merged
Abdusalom999 merged 30 commits from abdusalom0516/base/home-screen into master 2025-12-08 18:26:01 +00:00
278 changed files with 43471 additions and 10586 deletions
Showing only changes of commit 157545f1c0 - Show all commits

View File

@@ -118,6 +118,10 @@
"allowLocation": "Allow location access to discover beauty stores and services near you.", "allowLocation": "Allow location access to discover beauty stores and services near you.",
"useCurrentLocation": "Use current location", "useCurrentLocation": "Use current location",
"setFromMap": "Set from map", "setFromMap": "Set from map",
"enterManuallyLocation": "Enter Manually location" "enterManuallyLocation": "Enter Manually location",
"changeLanguage": "Change Language",
"selectPrefferedLanguage": "Select your preferred language for a personalized app experience."
} }

View File

@@ -1,108 +1,124 @@
{ {
"loginToExplore" : "Log in to explore your all in one vendor app favourites and shop effortlessly.", "loginToExplore" : "Войдите, чтобы исследовать наш универсальный сервис и делать покупки с удобством.",
"emailAddress": "Email Address*", "emailAddress": "Адрес электронной почты*",
"password": "Password*", "password": "Пароль*",
"enterPassword": "Enter password", "enterPassword": "Введите пароль",
"forgotPassword": "Forgot Password", "forgotPassword": "Забыли пароль",
"login": "Log in", "login": "Войти",
"orContinueWith": "or continue with", "orContinueWith": "или продолжить с",
"withGoogle": "с Google",
"withApple": "с Apple",
"withGoogle": "with Google", "dontHaveAccount": "Нет аккаунта?",
"withApple": "with Apple", "signUp": "Зарегистрироваться",
"dontHaveAccount": "Didn't have an account?", "skip": "Пропустить",
"signUp": "Sign up", "signUpToExplore": "Зарегистрируйтесь, чтобы получить доступ ко всем нашим услугам и начать делать покупки, поездки и многое другое.",
"skip": "Skip", "firstName": "Имя*",
"signUpToExplore": "Sign up to explore all our services and start shopping, riding, and more.", "lastName": "Фамилия*",
"firstName": "First Name*", "enterMobileNumber": "Введите номер телефона",
"lastName": "Last Name*", "confirmPassword": "Подтвердите пароль*",
"enterMobileNumber": "Enter Mobile number", "enterConfirmPassword": "Введите подтверждение пароля",
"confirmPassword": "Confirm Password*", "referralCode": "Реферальный код",
"enterConfirmPassword": "Enter confirm password", "enterReferralCode": "Введите реферальный код",
"referralCode": "Referral Code", "alreadyHaveAccount": "Уже есть аккаунт?",
"enterReferralCode": "Enter referral code", "enterYourregisteredEmail": "Введите свою зарегистрированную почту, чтобы получить ссылку для сброса.",
"alreadyHaveAccount":"Already have an account?", "sendLink": "Отправить ссылку",
"enterYourregisteredEmail": "Enter your registered email to receive a reset link.", "rememberPassword": "Вспомнили пароль?",
"sendLink": "Send Link", "enterOtpSent": "Введите код, отправленный на ваш телефон",
"rememberPassword": "Remember Password?", "resendOTP": "Отправить код повторно",
"enterOtpSent": "Enter the OTP sent to your mobile", "verify": "Подтвердить",
"resendOTP": "Resend OTP", "useYourMobileNumber": "Используйте номер телефона для быстрого и безопасного входа.",
"verify": "Verify", "sendCode": "Отправить код",
"useYourMobileNumber": "Use your mobile number to Log in easily and securely.", "serviceIsUnavailable": "Услуга недоступна по выбранному адресу.",
"sendCode":"Send Code", "pickUpLocation": "Место отправления",
"serviceIsUnavailable": "Service is unavailable at the selected address.", "destinationLocation": "Место назначения",
"pickUpLocation": "Pickup Location", "continueT": "Продолжить",
"destinationLocation": "Destination Location", "plsSelectSourceLocation": "Пожалуйста, выберите место отправления",
"continueT":"Continue", "plsSelectDestinationLocations": "Пожалуйста, выберите место назначения",
"plsSelectSourceLocation": "Please select source location", "selectVehicleType": "Выберите тип транспорта",
"plsSelectDestinationLocations": "Please select destination location", "plsSelectVehicleTypeFirst": "Сначала выберите тип транспорта.",
"selectVehicleType": "Select Your Vehicle Type", "plsSelectPaymentMethod": "Пожалуйста, выберите способ оплаты",
"plsSelectVehicleTypeFirst": "Please select a vehicle type first.", "insufficientWallet": "Недостаточно средств в кошельке. Пожалуйста, выберите другой способ оплаты.",
"plsSelectPaymentMethod": "Please select a payment method", "promoCode": "Промокод",
"insufficientWallet": "Insufficient wallet balance. Please select another payment method.", "thisOfferNotEligible": "Это предложение недоступно для данного заказа",
"promoCode": "Promo code", "viewAll": "Показать все",
"thisOfferNotEligible": "This offer not eligible for this booking", "writeCoupon": "Введите промокод",
"viewAll": "View All", "redeemNow": "Применить",
"writeCoupon": "Write coupon Code", "plsEnterCouponCode": "Пожалуйста, введите промокод",
"redeemNow": "Redeem now", "couponApplied": "Промокод успешно применён",
"plsEnterCouponCode":"Please enter a coupon code", "couponExpired": "Срок действия этого промокода истёк",
"couponApplied": "Coupon applied successfully", "invalidCouponCode": "Неверный промокод",
"couponExpired": "This coupon code has been expired", "orderSummary": "Сводка заказа",
"invalidCouponCode": "Invalid coupon code", "subtotal": "Промежуточный итог",
"orderSummary": "Order Summary", "discount": "Скидка",
"subtotal": "Subtotal", "orderTotal": "Итого",
"discount": "Discount", "confirmBooking": "Подтвердить заказ",
"orderTotal": "Order Total", "waitingForDriver": "Ожидание водителя....",
"confirmBooking": "Confirm Booking", "cancelRide": "Отменить поездку",
"waitingForDriver": "Waiting for driver....", "riderCancelledSucces": "Поездка успешно отменена",
"cancelRide": "Cancel Ride", "failedToCancel": "Не удалось отменить поездку",
"riderCancelledSucces": "Ride cancelled successfully", "pleaseWait": "Пожалуйста, подождите...",
"failedToCancel": "Failed to cancel ride", "change": "Изменить",
"pleaseWait": "Please wait...", "yourSosRequest": "Ваш SOS-запрос отправлен администратору",
"change": "Change", "yourSosrequestAlreadySubmitted": "Ваш SOS-запрос уже отправлен",
"yourSosRequest": "Your SOS request has been submitted to admin", "payNow": "Оплатить сейчас",
"yourSosrequestAlreadySubmitted": "Your SOS request is already submitted", "youDoNothaveSufficientwalletBalance": "Недостаточно средств в кошельке",
"payNow": "Pay Now", "somethingWentWrong": "Произошла ошибка, пожалуйста, свяжитесь с администратором.",
"youDoNothaveSufficientwalletBalance": "You do not have sufficient wallet balance", "cash": "Наличные",
"somethingWentWrong": "Something went wrong, please contact admin.", "coupon": "Промокод",
"cash": "Cash", "couponNotFound": "Промокод не найден.",
"coupon": "Coupon", "tapToApply": "Нажмите, чтобы применить",
"couponNotFound": "Coupon not found.", "home": "Главная",
"tapToApply": "Tap To Apply", "myBookings": "Мои заказы",
"home": "Home", "profile": "Профиль",
"myBookings": "My Bookings", "wallet": "Кошелёк",
"profile": "profile", "cabServiceType": "Тип такси",
"wallet": "Wallet", "everyRideVerified": "Каждая поездка. Каждый водитель. Проверены.",
"cabServiceType": "Cab Service Type", "allDriversIDCheck": "Все водители проходят проверку документов и биографии для вашей безопасности.",
"everyRideVerified": "Every Ride. Every Driver. Verified.", "intercity": "Междугородние",
"allDriversIDCheck": "All drivers go through ID checks and background verification for your safety.", "aroundTheCity": "По городу",
"intercity": "Intercity", "rideDetails": "Детали поездки",
"aroundTheCity": "Around the city", "orderId": "ID заказа:",
"rideDetails": "Ride Details", "bookingData": "Дата заказа:",
"orderId": "Order Id:", "rideAndFareSummary": "Детали поездки и стоимость",
"bookingData": "Booking Date:", "updateReview": "Обновить отзыв",
"rideAndFareSummary": "Ride & Fare Summary", "addReview": "Добавить отзыв",
"updateReview": "Update Review", "complain": "Жалоба",
"addReview": "Add Review", "distance": "Расстояние",
"complain": "Complain", "km": "км",
"distance": "Distance", "duration": "Продолжительность",
"km": "KM", "howWasTrip": "Как прошла поездка?",
"duration": "Duration", "yourFeedbackWillHelp": "Ваш отзыв поможет нам улучшить \n качество поездок",
"howWasTrip": "How was your trip?", "rateFor": "Оценка для",
"yourFeedbackWillHelp": "Your feedback will help us improve \n driving experience better", "typeComment": "Введите комментарий....",
"rateFor": "Rate for", "title": "Заголовок",
"typeComment": "Type comment....", "typeDescription": "Введите описание...",
"title": "Title", "save": "Сохранить",
"typeDescription": "Type Description...", "popularDestinations": "Популярные направления",
"save": "Save", "selectPaymentMethod": "Выберите способ оплаты",
"popularDestinations": "Popular Destinations", "prefferedPayment": "Предпочтительный способ оплаты",
"selectPaymentMethod": "Select Payment Method", "otherPaymentOptions": "Другие способы оплаты",
"prefferedPayment": "Preferred Payment", "rideHistory": "История поездок",
"otherPaymentOptions": "Other Payment Options", "plsLoginToAcc": "Пожалуйста, войдите, чтобы продолжить",
"rideHistory": "Ride History", "youAreNotLoggedIn": "Вы не вошли в систему. Пожалуйста, войдите, чтобы получить доступ к аккаунту и функциям.",
"plsLoginToAcc": "Please Log In to Continue", "noOrderfound": "Заказов не найдено",
"youAreNotLoggedIn": "Youre not logged in. Please sign in to access your account and explore all features.", "reset_password_link_sent": "Ссылка для сброса отправлена на {email}",
"noOrderfound": "No order found", "pay_amount": "Сумма к оплате: {amount}",
"reset_password_link_sent": "A reset link has been sent to {email}", "otherServices": "Другие услуги",
"pay_amount": "Pay Amount: {amount}" "foodDelivery": "Доставка еды",
"delivery": "Доставка",
"bookingTaxi": "Заказ \nТакси",
"updateYourWardrobe": "Обновите гардероб",
"weDeliverSafely": "Мы доставляем безопасно",
"rent": "Аренда",
"hugeSelectionOfAds": "Огромный выбор объявлений!",
"cosmetics": "Косметика",
"moreThan1000Products": "Более 1000 товаров",
"foodProducts": "Продукты питания",
"enableLocation": "Включите геолокацию",
"allowLocation": "Разрешите доступ к геолокации, чтобы найти магазины и услуги рядом с вами.",
"useCurrentLocation": "Использовать текущую геолокацию",
"setFromMap": "Выбрать на карте",
"enterManuallyLocation": "Введите адрес вручную",
"changeLanguage": "Изменить язык",
"selectPrefferedLanguage": "Выберите предпочитаемый язык для персонализированного использования приложения."
} }

View File

@@ -1,108 +1,124 @@
{ {
"loginToExplore" : "Log in to explore your all in one vendor app favourites and shop effortlessly.", "loginToExplore" : "Barcha xizmatlarimizdan foydalanish va qulay xarid qilish uchun tizimga kiring.",
"emailAddress": "Email Address*", "emailAddress": "Email manzil*",
"password": "Password*", "password": "Parol*",
"enterPassword": "Enter password", "enterPassword": "Parolni kiriting",
"forgotPassword": "Forgot Password", "forgotPassword": "Parolni unutdingizmi",
"login": "Log in", "login": "Kirish",
"orContinueWith": "or continue with", "orContinueWith": "yoki davom eting",
"withGoogle": "Google orqali",
"withApple": "Apple orqali",
"withGoogle": "with Google", "dontHaveAccount": "Hisobingiz yoqmi?",
"withApple": "with Apple", "signUp": "Royxatdan otish",
"dontHaveAccount": "Didn't have an account?", "skip": "Otkazib yuborish",
"signUp": "Sign up", "signUpToExplore": "Royxatdan oting va barcha xizmatlarimizdan foydalanishni boshlang.",
"skip": "Skip", "firstName": "Ism*",
"signUpToExplore": "Sign up to explore all our services and start shopping, riding, and more.", "lastName": "Familiya*",
"firstName": "First Name*", "enterMobileNumber": "Telefon raqamini kiriting",
"lastName": "Last Name*", "confirmPassword": "Parolni tasdiqlang*",
"enterMobileNumber": "Enter Mobile number", "enterConfirmPassword": "Tasdiqlash parolini kiriting",
"confirmPassword": "Confirm Password*", "referralCode": "Referal kod",
"enterConfirmPassword": "Enter confirm password", "enterReferralCode": "Referal kodni kiriting",
"referralCode": "Referral Code", "alreadyHaveAccount": "Hisobingiz bormi?",
"enterReferralCode": "Enter referral code", "enterYourregisteredEmail": "Email manzilingizni kiriting — sizga parolni tiklash havolasi yuboriladi.",
"alreadyHaveAccount":"Already have an account?", "sendLink": "Havolani yuborish",
"enterYourregisteredEmail": "Enter your registered email to receive a reset link.", "rememberPassword": "Parol esingizga tushdimi?",
"sendLink": "Send Link", "enterOtpSent": "Telefoningizga yuborilgan kodni kiriting",
"rememberPassword": "Remember Password?", "resendOTP": "Kod qayta yuborilsin",
"enterOtpSent": "Enter the OTP sent to your mobile", "verify": "Tasdiqlash",
"resendOTP": "Resend OTP", "useYourMobileNumber": "Telefon raqamingiz orqali oson va xavfsiz kirishingiz mumkin.",
"verify": "Verify", "sendCode": "Kod yuborish",
"useYourMobileNumber": "Use your mobile number to Log in easily and securely.", "serviceIsUnavailable": "Tanlangan manzilda xizmat mavjud emas.",
"sendCode":"Send Code", "pickUpLocation": "Jonash manzili",
"serviceIsUnavailable": "Service is unavailable at the selected address.", "destinationLocation": "Borish manzili",
"pickUpLocation": "Pickup Location", "continueT": "Davom etish",
"destinationLocation": "Destination Location", "plsSelectSourceLocation": "Iltimos, jonash manzilini tanlang",
"continueT":"Continue", "plsSelectDestinationLocations": "Iltimos, borish manzilini tanlang",
"plsSelectSourceLocation": "Please select source location", "selectVehicleType": "Transport turini tanlang",
"plsSelectDestinationLocations": "Please select destination location", "plsSelectVehicleTypeFirst": "Avval transport turini tanlang.",
"selectVehicleType": "Select Your Vehicle Type", "plsSelectPaymentMethod": "Iltimos, tolov usulini tanlang",
"plsSelectVehicleTypeFirst": "Please select a vehicle type first.", "insufficientWallet": "Hamyonda mablag yetarli emas. Boshqa tolov usulini tanlang.",
"plsSelectPaymentMethod": "Please select a payment method", "promoCode": "Promo kod",
"insufficientWallet": "Insufficient wallet balance. Please select another payment method.", "thisOfferNotEligible": "Bu taklif ushbu buyurtma uchun amal qilmaydi",
"promoCode": "Promo code", "viewAll": "Barchasini korish",
"thisOfferNotEligible": "This offer not eligible for this booking", "writeCoupon": "Promo kodni kiriting",
"viewAll": "View All", "redeemNow": "Qollash",
"writeCoupon": "Write coupon Code", "plsEnterCouponCode": "Iltimos, promo kodni kiriting",
"redeemNow": "Redeem now", "couponApplied": "Promo kod muvaffaqiyatli qollandi",
"plsEnterCouponCode":"Please enter a coupon code", "couponExpired": "Ushbu promo kodning muddati tugagan",
"couponApplied": "Coupon applied successfully", "invalidCouponCode": "Notogri promo kod",
"couponExpired": "This coupon code has been expired", "orderSummary": "Buyurtma tafsilotlari",
"invalidCouponCode": "Invalid coupon code", "subtotal": "Oraliq summa",
"orderSummary": "Order Summary", "discount": "Chegirma",
"subtotal": "Subtotal", "orderTotal": "Umumiy summa",
"discount": "Discount", "confirmBooking": "Buyurtmani tasdiqlash",
"orderTotal": "Order Total", "waitingForDriver": "Haydovchi kutilmoqda....",
"confirmBooking": "Confirm Booking", "cancelRide": "Safarni bekor qilish",
"waitingForDriver": "Waiting for driver....", "riderCancelledSucces": "Safar muvaffaqiyatli bekor qilindi",
"cancelRide": "Cancel Ride", "failedToCancel": "Safarni bekor qilish amalga oshmadi",
"riderCancelledSucces": "Ride cancelled successfully", "pleaseWait": "Iltimos, kuting...",
"failedToCancel": "Failed to cancel ride", "change": "Ozgartirish",
"pleaseWait": "Please wait...", "yourSosRequest": "Sizning SOS sorovingiz administratorga yuborildi",
"change": "Change", "yourSosrequestAlreadySubmitted": "SOS sorovi allaqachon yuborilgan",
"yourSosRequest": "Your SOS request has been submitted to admin", "payNow": "Hozir tolash",
"yourSosrequestAlreadySubmitted": "Your SOS request is already submitted", "youDoNothaveSufficientwalletBalance": "Hamyonda mablag yetarli emas",
"payNow": "Pay Now", "somethingWentWrong": "Xatolik yuz berdi, administrator bilan boglaning.",
"youDoNothaveSufficientwalletBalance": "You do not have sufficient wallet balance", "cash": "Naqd",
"somethingWentWrong": "Something went wrong, please contact admin.", "coupon": "Promo kod",
"cash": "Cash", "couponNotFound": "Promo kod topilmadi.",
"coupon": "Coupon", "tapToApply": "Qollash uchun bosing",
"couponNotFound": "Coupon not found.", "home": "Bosh sahifa",
"tapToApply": "Tap To Apply", "myBookings": "Buyurtmalarim",
"home": "Home", "profile": "Profil",
"myBookings": "My Bookings", "wallet": "Hamyon",
"profile": "profile", "cabServiceType": "Taksi xizmati turi",
"wallet": "Wallet", "everyRideVerified": "Har bir safar. Har bir haydovchi. Tasdiqlangan.",
"cabServiceType": "Cab Service Type", "allDriversIDCheck": "Barcha haydovchilar hujjat va tekshiruvdan otadi — xavfsizligingiz uchun.",
"everyRideVerified": "Every Ride. Every Driver. Verified.", "intercity": "Shaharlararo",
"allDriversIDCheck": "All drivers go through ID checks and background verification for your safety.", "aroundTheCity": "Shahar boylab",
"intercity": "Intercity", "rideDetails": "Safar tafsilotlari",
"aroundTheCity": "Around the city", "orderId": "Buyurtma ID:",
"rideDetails": "Ride Details", "bookingData": "Buyurtma sanasi:",
"orderId": "Order Id:", "rideAndFareSummary": "Safar va tolov tafsilotlari",
"bookingData": "Booking Date:", "updateReview": "Sharhni yangilash",
"rideAndFareSummary": "Ride & Fare Summary", "addReview": "Sharh qoldirish",
"updateReview": "Update Review", "complain": "Shikoyat",
"addReview": "Add Review", "distance": "Masofa",
"complain": "Complain", "km": "km",
"distance": "Distance", "duration": "Davomiylik",
"km": "KM", "howWasTrip": "Safar qanday otdi?",
"duration": "Duration", "yourFeedbackWillHelp": "Fikringiz safar sifatini yanada yaxshilashga yordam beradi",
"howWasTrip": "How was your trip?", "rateFor": "Baholash:",
"yourFeedbackWillHelp": "Your feedback will help us improve \n driving experience better", "typeComment": "Izoh yozing....",
"rateFor": "Rate for", "title": "Sarlavha",
"typeComment": "Type comment....", "typeDescription": "Tavsif yozing...",
"title": "Title", "save": "Saqlash",
"typeDescription": "Type Description...", "popularDestinations": "Mashhur yonalishlar",
"save": "Save", "selectPaymentMethod": "Tolov usulini tanlang",
"popularDestinations": "Popular Destinations", "prefferedPayment": "Afzal tolov usuli",
"selectPaymentMethod": "Select Payment Method", "otherPaymentOptions": "Boshqa tolov usullari",
"prefferedPayment": "Preferred Payment", "rideHistory": "Safar tarixi",
"otherPaymentOptions": "Other Payment Options", "plsLoginToAcc": "Davom etish uchun tizimga kiring",
"rideHistory": "Ride History", "youAreNotLoggedIn": "Siz tizimga kirmagansiz. Hisobingizga kirib barcha funksiyalardan foydalaning.",
"plsLoginToAcc": "Please Log In to Continue", "noOrderfound": "Buyurtmalar topilmadi",
"youAreNotLoggedIn": "Youre not logged in. Please sign in to access your account and explore all features.", "reset_password_link_sent": "Parol tiklash havolasi {email} manziliga yuborildi",
"noOrderfound": "No order found", "pay_amount": "Tolanadigan summa: {amount}",
"reset_password_link_sent": "A reset link has been sent to {email}", "otherServices": "Boshqa xizmatlar",
"pay_amount": "Pay Amount: {amount}" "foodDelivery": "Oziq-ovqat yetkazib berish",
"delivery": "Yetkazib berish",
"bookingTaxi": "Taksi \nBuyurtma",
"updateYourWardrobe": "Garderobingizni yangilang",
"weDeliverSafely": "Biz xavfsiz yetkazib beramiz",
"rent": "Ijara",
"hugeSelectionOfAds": "Keng elonlar tanlovi!",
"cosmetics": "Kosmetika",
"moreThan1000Products": "1000 dan ortiq mahsulotlar",
"foodProducts": "Oziq-ovqat mahsulotlari",
"enableLocation": "Shaxsiylashtirilgan tajriba uchun geolokatsiyani yoqing",
"allowLocation": "Yaqin atrofdagi dokon va xizmatlarni topish uchun geolokatsiyaga ruxsat bering.",
"useCurrentLocation": "Joriy manzildan foydalanish",
"setFromMap": "Xaritadan tanlash",
"enterManuallyLocation": "Manzilni qolda kiriting",
"changeLanguage": "Tilni ozgartirish",
"selectPrefferedLanguage": "Shaxsiylashtirilgan tajriba uchun afzal tilni tanlang."
} }

View File

@@ -120,7 +120,22 @@ class ConstTexts {
static String useCurrentLocation = "useCurrentLocation"; static String useCurrentLocation = "useCurrentLocation";
static String setFromMap = "setFromMap"; static String setFromMap = "setFromMap";
static String enterManuallyLocation = "enterManuallyLocation"; static String enterManuallyLocation = "enterManuallyLocation";
// static String intercity = "intercity"; static String changeLanguage = "changeLanguage";
static String selectPrefferedLanguage = "selectPrefferedLanguage";
// static String rideDetails = "rideDetails";
// static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance";
// static String somethingWentWrong = "somethingWentWrong";
// static String cash = "cash";
// static String hugeSelectionOfAds = "hugeSelectionOfAds";
// static String cosmetics = "cosmetics";
// static String moreThan1000Products = "moreThan1000Products";
// static String foodProducts = "foodProducts";
// static String enableLocation = "enableLocation";
// static String allowLocation = "allowLocation";
// static String useCurrentLocation = "useCurrentLocation";
// static String setFromMap = "setFromMap";
// static String enterManuallyLocation = "enterManuallyLocation";
// static String changeLanguage = "changeLanguage";
// static String aroundTheCity = "aroundTheCity"; // static String aroundTheCity = "aroundTheCity";
// static String rideDetails = "rideDetails"; // static String rideDetails = "rideDetails";
// static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance"; // static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance";

View File

@@ -7,6 +7,7 @@ import 'package:customer/screen_ui/service_home_screen/service_list_screen.dart'
import 'package:customer/utils/notification_service.dart'; import 'package:customer/utils/notification_service.dart';
import 'package:customer/utils/preferences.dart'; import 'package:customer/utils/preferences.dart';
import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart' hide Trans; import 'package:get/get.dart' hide Trans;
import '../screen_ui/auth_screens/login_screen.dart'; import '../screen_ui/auth_screens/login_screen.dart';
import '../screen_ui/location_enable_screens/location_permission_screen.dart'; import '../screen_ui/location_enable_screens/location_permission_screen.dart';
@@ -14,9 +15,13 @@ import '../screen_ui/on_boarding_screen/on_boarding_screen.dart';
import '../service/fire_store_utils.dart'; import '../service/fire_store_utils.dart';
class SplashController extends GetxController { class SplashController extends GetxController {
final BuildContext context;
SplashController({required this.context});
@override @override
void onInit() { void onInit() {
Timer(const Duration(seconds: 3), () => redirectScreen()); Timer(const Duration(seconds: 2), () => redirectScreen());
super.onInit(); super.onInit();
} }
@@ -73,4 +78,11 @@ class SplashController extends GetxController {
} }
} }
} }
void _navigateAndRemoveAll(Widget screen) {
Navigator.of(context).pushAndRemoveUntil(
MaterialPageRoute(builder: (_) => screen),
(route) => false,
);
}
} }

View File

@@ -2,11 +2,13 @@ import 'package:customer/screen_ui/splash_screen/splash_screen.dart';
import 'package:customer/service/localization_service.dart'; import 'package:customer/service/localization_service.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/easy_loading_config.dart'; import 'package:customer/themes/easy_loading_config.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/preferences.dart'; import 'package:customer/utils/preferences.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_phoenix/flutter_phoenix.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'controllers/global_setting_controller.dart'; import 'controllers/global_setting_controller.dart';
@@ -28,14 +30,14 @@ void main() async {
runApp( runApp(
EasyLocalization( EasyLocalization(
startLocale: Locale('en', 'US'), startLocale: Locale('uz', 'UZ'),
supportedLocales: [ supportedLocales: [
Locale('en', 'US'), Locale('en', 'US'),
Locale('uz', 'UZ'), Locale('uz', 'UZ'),
Locale('ru', 'RU'), Locale('ru', 'RU'),
], ],
path: 'assets/translations', path: 'assets/translations',
fallbackLocale: Locale('en', 'US'), fallbackLocale: Locale('uz', 'UZ'),
child: MyApp(), child: MyApp(),
), ),
); );
@@ -54,7 +56,8 @@ class MyApp extends StatelessWidget {
designSize: Size(375, 812), designSize: Size(375, 812),
minTextAdapt: true, minTextAdapt: true,
splitScreenMode: true, splitScreenMode: true,
child: GetMaterialApp( child: MaterialApp(
navigatorKey: AppRouter.navigatorKey,
localizationsDelegates: context.localizationDelegates, localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales, supportedLocales: context.supportedLocales,
locale: context.locale, locale: context.locale,
@@ -66,8 +69,7 @@ class MyApp extends StatelessWidget {
child: EasyLoading.init()(context, child), child: EasyLoading.init()(context, child),
); );
}, },
translations: LocalizationService(), // fallbackLocale: LocalizationService.locale,
fallbackLocale: LocalizationService.locale,
themeMode: themeController.themeMode, themeMode: themeController.themeMode,
theme: ThemeData( theme: ThemeData(
scaffoldBackgroundColor: AppThemeData.surface, scaffoldBackgroundColor: AppThemeData.surface,

View File

@@ -1,13 +1,15 @@
import 'dart:convert';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/change_language_controller.dart'; import 'package:customer/controllers/change_language_controller.dart';
import 'package:customer/screen_ui/splash_screen/splash_screen.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:customer/utils/preferences.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flag/flag_enum.dart';
import 'package:flag/flag_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart' hide Trans;import '../../../controllers/theme_controller.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../../service/localization_service.dart'; import 'package:get/get.dart' hide Trans;
import '../../../controllers/theme_controller.dart';
class ChangeLanguageScreen extends StatelessWidget { class ChangeLanguageScreen extends StatelessWidget {
const ChangeLanguageScreen({super.key}); const ChangeLanguageScreen({super.key});
@@ -20,81 +22,199 @@ class ChangeLanguageScreen extends StatelessWidget {
init: ChangeLanguageController(), init: ChangeLanguageController(),
builder: (controller) { builder: (controller) {
return Scaffold( return Scaffold(
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, centerTitle: false, titleSpacing: 0), appBar: AppBar(
backgroundColor:
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
leading: InkWell(
onTap: () {
// Get.back();
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => SplashScreen()),
(route) => false,
);
},
child: Icon(Icons.arrow_back),
),
),
body: body:
controller.isLoading.value controller.isLoading.value
? Constant.loader() ? Constant.loader()
: Padding( : Column(
padding: const EdgeInsets.symmetric(horizontal: 16), crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, // Padding(
children: [ // padding: const EdgeInsets.symmetric(horizontal: 16),
Text( // child: Column(
"Change Language".tr(), // crossAxisAlignment: CrossAxisAlignment.start,
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500), // children: [
), // Text(
Text( // ConstTexts.changeLanguage.tr(),
"Select your preferred language for a personalized app experience.".tr(), // style: TextStyle(
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400), // fontSize: 24,
), // color:
const SizedBox(height: 20), // isDark
Expanded( // ? AppThemeData.grey50
child: GridView.count( // : AppThemeData.grey900,
crossAxisCount: 2, // fontFamily: AppThemeData.semiBold,
childAspectRatio: (1.1 / 1), // fontWeight: FontWeight.w500,
crossAxisSpacing: 5, // ),
mainAxisSpacing: 1, // ),
children: // Text(
controller.languageList // ConstTexts.selectPrefferedLanguage.tr(),
.map( // style: TextStyle(
(data) => Obx( // fontSize: 16,
() => GestureDetector( // color:
onTap: () { // isDark
LocalizationService().changeLocale(data.slug.toString()); // ? AppThemeData.grey50
Preferences.setString(Preferences.languageCodeKey, jsonEncode(data)); // : AppThemeData.grey900,
controller.selectedLanguage.value = data; // fontFamily: AppThemeData.regular,
}, // fontWeight: FontWeight.w400,
child: Container( // ),
padding: const EdgeInsets.all(16), // ),
child: Column( // ],
children: [ // ),
NetworkImageWidget(imageUrl: data.image.toString(), height: 80, width: 80), // ),
// SvgPicture.network( _buildLanguageButton(
// data.image.toString(), isActive: context.locale == Locale("uz", "UZ"),
// height: 80, flagCode: FlagsCode.UZ,
// width: 80, title: "O'zbekcha",
// fit: BoxFit.contain, onTap: () async {
// placeholderBuilder: (context) => const Center(child: CircularProgressIndicator(strokeWidth: 1.5)), await context.setLocale(Locale("uz", "UZ"));
// ), Get.forceAppUpdate();
const SizedBox(height: 5), },
Text( ),
"${data.title}", _buildDivider(),
style: TextStyle( _buildLanguageButton(
fontSize: 16, isActive: context.locale == Locale("ru", "RU"),
color: flagCode: FlagsCode.RU,
controller.selectedLanguage.value.slug == data.slug title: "Русский",
? AppThemeData.primary300 onTap: () async {
: isDark await context.setLocale(Locale("ru", "RU"));
? AppThemeData.grey400 Get.forceAppUpdate();
: AppThemeData.grey500, },
fontFamily: AppThemeData.medium, ),
fontWeight: FontWeight.w400, _buildDivider(),
), _buildLanguageButton(
), isActive: context.locale == Locale("en", "US"),
], flagCode: FlagsCode.US,
), title: "English",
), onTap: () async {
), await context.setLocale(Locale("en", "US"));
), Get.forceAppUpdate();
) },
.toList(), ),
),
), // Expanded(
], // child: GridView.count(
), // crossAxisCount: 2,
// childAspectRatio: (1.1 / 1),
// crossAxisSpacing: 5,
// mainAxisSpacing: 1,
// children:
// controller.languageList
// .map(
// (data) => Obx(
// () => GestureDetector(
// onTap: () {
// LocalizationService().changeLocale(data.slug.toString());
// Preferences.setString(Preferences.languageCodeKey, jsonEncode(data));
// controller.selectedLanguage.value = data;
// },
// child: Container(
// padding: const EdgeInsets.all(16),
// child: Column(
// children: [
// NetworkImageWidget(imageUrl: data.image.toString(), height: 80, width: 80),
// // SvgPicture.network(
// // data.image.toString(),
// // height: 80,
// // width: 80,
// // fit: BoxFit.contain,
// // placeholderBuilder: (context) => const Center(child: CircularProgressIndicator(strokeWidth: 1.5)),
// // ),
// const SizedBox(height: 5),
// Text(
// "${data.title}",
// style: TextStyle(
// fontSize: 16,
// color:
// controller.selectedLanguage.value.slug == data.slug
// ? AppThemeData.primary300
// : isDark
// ? AppThemeData.grey400
// : AppThemeData.grey500,
// fontFamily: AppThemeData.medium,
// fontWeight: FontWeight.w400,
// ),
// ),
// ],
// ),
// ),
// ),
// ),
// )
// .toList(),
// ),
// ),
],
), ),
); );
}, },
); );
} }
Widget _buildDivider() => Padding(
padding: EdgeInsetsGeometry.symmetric(horizontal: 16.r),
child: Divider(thickness: 1.2.r),
);
InkWell _buildLanguageButton({
required bool isActive,
required VoidCallback onTap,
required String title,
required FlagsCode flagCode,
}) {
return InkWell(
hoverColor: Colors.transparent,
splashColor: Colors.transparent,
overlayColor: WidgetStatePropertyAll(Colors.transparent),
onTap: onTap,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 15.r).copyWith(right: 16.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Flag.fromCode(
flagCode,
height: 40.h,
width: 90.w,
borderRadius: 12.r,
),
Text(
title,
style: AppThemeData.mediumTextStyle(
fontSize: 16.sp,
color: AppThemeData.darkGrey,
),
),
],
),
isActive
? Icon(
Icons.circle,
color: AppThemeData.darkGrey.withValues(alpha: 0.6),
size: 15.r,
)
: SizedBox.shrink(),
],
),
),
);
}
} }

View File

@@ -9,12 +9,16 @@ class SplashScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GetBuilder<SplashController>( return GetBuilder<SplashController>(
init: SplashController(), init: SplashController(context: context),
builder: (controller) { builder: (controller) {
return Scaffold( return Scaffold(
backgroundColor: AppThemeData.mainColor, backgroundColor: AppThemeData.mainColor,
body: Center( body: Center(
child: Image.asset("assets/images/fondex_logo_main.png", width: 120, height: 120), child: Image.asset(
"assets/images/fondex_logo_main.png",
width: 120,
height: 120,
),
), ),
); );
}, },

42
lib/utils/app_router.dart Normal file
View File

@@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
class AppRouter {
static final GlobalKey<NavigatorState> navigatorKey =
GlobalKey<NavigatorState>();
static void close() {
if (navigatorKey.currentState?.canPop() ?? false) {
navigatorKey.currentState!.pop();
}
}
static void go(Widget page) {
navigatorKey.currentState?.push(_createRoute(page));
}
static void open(Widget page) {
navigatorKey.currentState?.pushAndRemoveUntil(
_createRoute(page),
(Route<dynamic> route) => false,
);
}
static PageRouteBuilder _createRoute(Widget page) {
return PageRouteBuilder(
transitionDuration: const Duration(milliseconds: 200),
reverseTransitionDuration: const Duration(milliseconds: 100),
pageBuilder: (context, animation, secondaryAnimation) => page,
transitionsBuilder: (context, animation, secondaryAnimation, child) {
final curvedAnimation = CurvedAnimation(
parent: animation,
curve: Curves.ease,
);
return ScaleTransition(
alignment: Alignment.center,
scale: Tween<double>(begin: 0.950, end: 1).animate(curvedAnimation),
child: child,
);
},
);
}
}

View File

@@ -209,6 +209,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.4.1" version: "3.4.1"
country_flags:
dependency: "direct main"
description:
name: country_flags
sha256: "714f2d415e74828eb08787d552a05e94cdf2cbe0607a5656f3e70087cd7bb7e0"
url: "https://pub.dev"
source: hosted
version: "4.1.0"
cross_file: cross_file:
dependency: transitive dependency: transitive
description: description:
@@ -337,6 +345,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.0.2" version: "0.0.2"
enum_to_string:
dependency: transitive
description:
name: enum_to_string
sha256: "93b75963d3b0c9f6a90c095b3af153e1feccb79f6f08282d3274ff8d9eea52bc"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
equatable: equatable:
dependency: transitive dependency: transitive
description: description:
@@ -537,6 +553,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.1.1"
flag:
dependency: "direct main"
description:
name: flag
sha256: "69e3e1d47453349ef72e2ebf4234b88024c0d57f9bcfaa7cc7facec49cd8561f"
url: "https://pub.dev"
source: hosted
version: "7.0.2"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@@ -683,6 +707,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.1" version: "0.2.1"
flutter_phoenix:
dependency: "direct main"
description:
name: flutter_phoenix
sha256: "39589dac934ea476d0e43fb60c1ddfba58f14960743640c8250dea11c4333378"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@@ -1133,6 +1165,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.20.2" version: "0.20.2"
jovial_misc:
dependency: transitive
description:
name: jovial_misc
sha256: "4301011027d87b8b919cb862db84071a34448eadbb32cc8d40fe505424dfe69a"
url: "https://pub.dev"
source: hosted
version: "0.9.2"
jovial_svg:
dependency: transitive
description:
name: jovial_svg
sha256: "08dd24b800d48796c9c0227acb96eb00c6cacccb1d7de58d79fc924090049868"
url: "https://pub.dev"
source: hosted
version: "1.1.28"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:

View File

@@ -90,6 +90,9 @@ dependencies:
flutter_hooks: ^0.21.3+1 flutter_hooks: ^0.21.3+1
easy_localization: ^3.0.8 easy_localization: ^3.0.8
flutter_localization: ^0.3.3 flutter_localization: ^0.3.3
country_flags: ^4.1.0
flag: ^7.0.2
flutter_phoenix: ^1.1.1
dependency_overrides: dependency_overrides:
webview_flutter: ^4.9.0 webview_flutter: ^4.9.0