Localization

localization_aamir
Aamir.Muhammad 3 months ago
parent 2e9d665aaf
commit 201cbd185c

@ -328,7 +328,7 @@
"vehiclePart": "جزء المركبة", "vehiclePart": "جزء المركبة",
"damagePartPictures": "صور الأجزاء المتضررة", "damagePartPictures": "صور الأجزاء المتضررة",
"vehicleDamagePart": "جزء المركبة المتضرر", "vehicleDamagePart": "جزء المركبة المتضرر",
"duration": "المدة", "duration": ":المدة",
"specialServices": "الخدمات الخاصة", "specialServices": "الخدمات الخاصة",
"specialService": "خدمة خاصة", "specialService": "خدمة خاصة",
"adContactDetails": "تفاصيل الاتصال بالإعلان", "adContactDetails": "تفاصيل الاتصال بالإعلان",
@ -457,7 +457,7 @@
"stoptheBuyers": "سنتوقف عن عرض هذا الإعلان للمشترين", "stoptheBuyers": "سنتوقف عن عرض هذا الإعلان للمشترين",
"cancelReservation": "إلغاء الحجز", "cancelReservation": "إلغاء الحجز",
"reasonForCancellation": "سبب الإلغاء", "reasonForCancellation": "سبب الإلغاء",
"doWantCancelReservation?": "هل تريد إلغاء الحجز؟", "doWantCancelReservation": "هل تريد إلغاء الحجز؟",
"yourAdVisibletoBuy": "سيتم إلغاء حجز إعلانك وسيكون هذا الإعلان مرئيًا للجميع مرة أخرى للشراء", "yourAdVisibletoBuy": "سيتم إلغاء حجز إعلانك وسيكون هذا الإعلان مرئيًا للجميع مرة أخرى للشراء",
"completeDeal": "إتمام الصفقة", "completeDeal": "إتمام الصفقة",
"uploadBankReceipt": "تحميل إيصال البنك", "uploadBankReceipt": "تحميل إيصال البنك",
@ -475,7 +475,42 @@
"waitingAdminsApproval": "في انتظار موافقة الإدارة", "waitingAdminsApproval": "في انتظار موافقة الإدارة",
"sold": "تم البيع", "sold": "تم البيع",
"noAdsShow": "لا توجد إعلانات لعرضها", "noAdsShow": "لا توجد إعلانات لعرضها",
"damagePartList": "قائمة الأجزاء المتضررة" "damagePartList": "قائمة الأجزاء المتضررة",
"searchPart": "البحث عن جزء",
"addSpecialService": "إضافة خدمة خاصة",
"vehicleVar": "السيارة",
"detailsVar": "التفاصيل",
"damageVar": "الضرر",
"partsVar": "الأجزاء",
"additional": "إضافي",
"review": "مراجعة",
"adVar": "الإعلان",
"updateAd": "تحديث الإعلان",
"createAd": "إنشاء إعلان",
"next": "التالي",
"submitAd": "إرسال الإعلان",
"selectAdType": "اختر نوع الإعلان",
"validUntilSubscriptionExpiration": "صالح حتى انتهاء الاشتراك",
"adsRemaining": "الإعلانات المتبقية",
"youLeftAdsGivenSubscription": "لقد بقي لديك 05 من 50 إعلانًا في الاشتراك.",
"updateSubscription": "تحديث الاشتراك",
"workInProgress": "العمل جارٍ",
"visitCompleted": "تمت الزيارة",
"youWantCancelAppointment": "هل تريد إلغاء هذا الموعد؟",
"appointmentCancelledCannotUndoAction": "سيتم إلغاء موعدك ولا يمكنك التراجع عن هذا الإجراء",
"appointment": "الموعد",
"rescheduleAppointment": "إعادة جدولة الموعد",
"payforAppointment": "دفع ثمن الموعد",
"appointmentsFilter": "تصفية المواعيد",
"searchByProvider": "البحث حسب المزود",
"selectProvider": "اختر المزود",
"searchByBranch": "البحث حسب الفرع",
"searchByCategory": "البحث حسب الفئة",
"selectCategory": "اختر الفئة",
"searchByService": "البحث حسب الخدمة",
"selectServices": "اختر الخدمات",
"modifyPackage": "تعديل الحزمة"

@ -328,7 +328,7 @@
"vehiclePart": "Vehicle Part", "vehiclePart": "Vehicle Part",
"damagePartPictures": "Damage Part Pictures", "damagePartPictures": "Damage Part Pictures",
"vehicleDamagePart": "Vehicle Damage Part", "vehicleDamagePart": "Vehicle Damage Part",
"duration": "Duration", "duration": "Duration:",
"specialServices": "Special Services", "specialServices": "Special Services",
"specialService": "Special Service", "specialService": "Special Service",
"adContactDetails": "Ad Contact Details", "adContactDetails": "Ad Contact Details",
@ -458,7 +458,7 @@
"stoptheBuyers":"We will stop showing this ad to the buyers", "stoptheBuyers":"We will stop showing this ad to the buyers",
"cancelReservation":"Cancel Reservation", "cancelReservation":"Cancel Reservation",
"reasonForCancellation":"Reason for Cancellation", "reasonForCancellation":"Reason for Cancellation",
"doWantCancelReservation?":"Do you want to cancel the reservation", "doWantCancelReservation":"Do you want to cancel the reservation",
"yourAdVisibletoBuy.":"Your ad reservation will be cancelled and this ad will be again visible to everyone to buy", "yourAdVisibletoBuy.":"Your ad reservation will be cancelled and this ad will be again visible to everyone to buy",
"completeDeal":"Complete Deal", "completeDeal":"Complete Deal",
"uploadBankReceipt":"Upload Bank Receipt", "uploadBankReceipt":"Upload Bank Receipt",
@ -476,7 +476,45 @@
"waitingAdminsApproval":"Waiting for Admins Approval", "waitingAdminsApproval":"Waiting for Admins Approval",
"sold":"Sold", "sold":"Sold",
"noAdsShow":"No Ads to show", "noAdsShow":"No Ads to show",
"damagePartList":"Damage Part List" "damagePartList":"Damage Part List",
"searchPart":"Search Part",
"addSpecialService":"Add Special Service",
"vehicleVar":"Vehicle",
"detailsVar":"Details",
"damageVar":"Damage",
"partsVar": "Parts",
"additional":"Additional",
"review":"Review",
"adVar": "Ad",
"updateAd":"Update Ad",
"createAd":"Create Ad",
"next":"Next",
"submitAd":"Submit Ad",
"selectAdType":"Select Ad Type",
"validUntilSubscriptionExpiration":"Valid Until Subscription Expiration",
"adsRemaining ":"Ads Remaining",
"youLeftAdsGivenSubscription":"You have left with 05 out of 50 ads given in the subscription.",
"updateSubscription":"Update Subscription",
"workInProgress":"Work In Progress",
"visitCompleted":"Visit Completed",
"youWantCancelAppointment":"Do you want to cancel this appointment?",
"appointmentCancelledCannotUndoAction":"Your appointment will be cancelled and you cannot undo this action.",
"appointment":"Appointment",
"rescheduleAppointment":"Reschedule Appointment",
"payforAppointment":"Pay for Appointment",
"appointmentsFilter":"Appointments Filter",
"searchByProvider":"Search By Provider",
"selectProvider":"Select Provider",
"searchByBranch":"Search By Branch",
"searchByCategory":"Search By Category",
"selectCategory":"Select Category",
"searchByService":"Search By Service",
"selectServices":"Select Services",
"modifyPackage": "Modify Package"

@ -344,7 +344,7 @@ class CodegenLoader extends AssetLoader{
"vehiclePart": "جزء المركبة", "vehiclePart": "جزء المركبة",
"damagePartPictures": "صور الأجزاء المتضررة", "damagePartPictures": "صور الأجزاء المتضررة",
"vehicleDamagePart": "جزء المركبة المتضرر", "vehicleDamagePart": "جزء المركبة المتضرر",
"duration": "المدة", "duration": ":المدة",
"specialServices": "الخدمات الخاصة", "specialServices": "الخدمات الخاصة",
"specialService": "خدمة خاصة", "specialService": "خدمة خاصة",
"adContactDetails": "تفاصيل الاتصال بالإعلان", "adContactDetails": "تفاصيل الاتصال بالإعلان",
@ -473,7 +473,7 @@ class CodegenLoader extends AssetLoader{
"stoptheBuyers": "سنتوقف عن عرض هذا الإعلان للمشترين", "stoptheBuyers": "سنتوقف عن عرض هذا الإعلان للمشترين",
"cancelReservation": "إلغاء الحجز", "cancelReservation": "إلغاء الحجز",
"reasonForCancellation": "سبب الإلغاء", "reasonForCancellation": "سبب الإلغاء",
"doWantCancelReservation?": "هل تريد إلغاء الحجز؟", "doWantCancelReservation": "هل تريد إلغاء الحجز؟",
"yourAdVisibletoBuy": "سيتم إلغاء حجز إعلانك وسيكون هذا الإعلان مرئيًا للجميع مرة أخرى للشراء", "yourAdVisibletoBuy": "سيتم إلغاء حجز إعلانك وسيكون هذا الإعلان مرئيًا للجميع مرة أخرى للشراء",
"completeDeal": "إتمام الصفقة", "completeDeal": "إتمام الصفقة",
"uploadBankReceipt": "تحميل إيصال البنك", "uploadBankReceipt": "تحميل إيصال البنك",
@ -491,7 +491,41 @@ class CodegenLoader extends AssetLoader{
"waitingAdminsApproval": "في انتظار موافقة الإدارة", "waitingAdminsApproval": "في انتظار موافقة الإدارة",
"sold": "تم البيع", "sold": "تم البيع",
"noAdsShow": "لا توجد إعلانات لعرضها", "noAdsShow": "لا توجد إعلانات لعرضها",
"damagePartList": "قائمة الأجزاء المتضررة" "damagePartList": "قائمة الأجزاء المتضررة",
"searchPart": "البحث عن جزء",
"addSpecialService": "إضافة خدمة خاصة",
"vehicleVar": "السيارة",
"detailsVar": "التفاصيل",
"damageVar": "الضرر",
"partsVar": "الأجزاء",
"additional": "إضافي",
"review": "مراجعة",
"adVar": "الإعلان",
"updateAd": "تحديث الإعلان",
"createAd": "إنشاء إعلان",
"next": "التالي",
"submitAd": "إرسال الإعلان",
"selectAdType": "اختر نوع الإعلان",
"validUntilSubscriptionExpiration": "صالح حتى انتهاء الاشتراك",
"adsRemaining": "الإعلانات المتبقية",
"youLeftAdsGivenSubscription": "لقد بقي لديك 05 من 50 إعلانًا في الاشتراك.",
"updateSubscription": "تحديث الاشتراك",
"workInProgress": "العمل جارٍ",
"visitCompleted": "تمت الزيارة",
"youWantCancelAppointment": "هل تريد إلغاء هذا الموعد؟",
"appointmentCancelledCannotUndoAction": "سيتم إلغاء موعدك ولا يمكنك التراجع عن هذا الإجراء",
"appointment": "الموعد",
"rescheduleAppointment": "إعادة جدولة الموعد",
"payforAppointment": "دفع ثمن الموعد",
"appointmentsFilter": "تصفية المواعيد",
"searchByProvider": "البحث حسب المزود",
"selectProvider": "اختر المزود",
"searchByBranch": "البحث حسب الفرع",
"searchByCategory": "البحث حسب الفئة",
"selectCategory": "اختر الفئة",
"searchByService": "البحث حسب الخدمة",
"selectServices": "اختر الخدمات",
"modifyPackage": "تعديل الحزمة"
}; };
static const Map<String,dynamic> en_US = { static const Map<String,dynamic> en_US = {
"firstTimeLogIn": "First Time Log In", "firstTimeLogIn": "First Time Log In",
@ -823,7 +857,7 @@ static const Map<String,dynamic> en_US = {
"vehiclePart": "Vehicle Part", "vehiclePart": "Vehicle Part",
"damagePartPictures": "Damage Part Pictures", "damagePartPictures": "Damage Part Pictures",
"vehicleDamagePart": "Vehicle Damage Part", "vehicleDamagePart": "Vehicle Damage Part",
"duration": "Duration", "duration": "Duration:",
"specialServices": "Special Services", "specialServices": "Special Services",
"specialService": "Special Service", "specialService": "Special Service",
"adContactDetails": "Ad Contact Details", "adContactDetails": "Ad Contact Details",
@ -953,7 +987,7 @@ static const Map<String,dynamic> en_US = {
"stoptheBuyers": "We will stop showing this ad to the buyers", "stoptheBuyers": "We will stop showing this ad to the buyers",
"cancelReservation": "Cancel Reservation", "cancelReservation": "Cancel Reservation",
"reasonForCancellation": "Reason for Cancellation", "reasonForCancellation": "Reason for Cancellation",
"doWantCancelReservation?": "Do you want to cancel the reservation", "doWantCancelReservation": "Do you want to cancel the reservation",
"yourAdVisibletoBuy.": "Your ad reservation will be cancelled and this ad will be again visible to everyone to buy", "yourAdVisibletoBuy.": "Your ad reservation will be cancelled and this ad will be again visible to everyone to buy",
"completeDeal": "Complete Deal", "completeDeal": "Complete Deal",
"uploadBankReceipt": "Upload Bank Receipt", "uploadBankReceipt": "Upload Bank Receipt",
@ -971,7 +1005,41 @@ static const Map<String,dynamic> en_US = {
"waitingAdminsApproval": "Waiting for Admins Approval", "waitingAdminsApproval": "Waiting for Admins Approval",
"sold": "Sold", "sold": "Sold",
"noAdsShow": "No Ads to show", "noAdsShow": "No Ads to show",
"damagePartList": "Damage Part List" "damagePartList": "Damage Part List",
"searchPart": "Search Part",
"addSpecialService": "Add Special Service",
"vehicleVar": "Vehicle",
"detailsVar": "Details",
"damageVar": "Damage",
"partsVar": "Parts",
"additional": "Additional",
"review": "Review",
"adVar": "Ad",
"updateAd": "Update Ad",
"createAd": "Create Ad",
"next": "Next",
"submitAd": "Submit Ad",
"selectAdType": "Select Ad Type",
"validUntilSubscriptionExpiration": "Valid Until Subscription Expiration",
"adsRemaining ": "Ads Remaining",
"youLeftAdsGivenSubscription": "You have left with 05 out of 50 ads given in the subscription.",
"updateSubscription": "Update Subscription",
"workInProgress": "Work In Progress",
"visitCompleted": "Visit Completed",
"youWantCancelAppointment": "Do you want to cancel this appointment?",
"appointmentCancelledCannotUndoAction": "Your appointment will be cancelled and you cannot undo this action.",
"appointment": "Appointment",
"rescheduleAppointment": "Reschedule Appointment",
"payforAppointment": "Pay for Appointment",
"appointmentsFilter": "Appointments Filter",
"searchByProvider": "Search By Provider",
"selectProvider": "Select Provider",
"searchByBranch": "Search By Branch",
"searchByCategory": "Search By Category",
"selectCategory": "Select Category",
"searchByService": "Search By Service",
"selectServices": "Select Services",
"modifyPackage": "Modify Package"
}; };
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
} }

@ -436,7 +436,7 @@ abstract class LocaleKeys {
static const stoptheBuyers = 'stoptheBuyers'; static const stoptheBuyers = 'stoptheBuyers';
static const cancelReservation = 'cancelReservation'; static const cancelReservation = 'cancelReservation';
static const reasonForCancellation = 'reasonForCancellation'; static const reasonForCancellation = 'reasonForCancellation';
static const doWantCancelReservation? = 'doWantCancelReservation?'; static const doWantCancelReservation = 'doWantCancelReservation';
static const yourAdVisibletoBuy = 'yourAdVisibletoBuy'; static const yourAdVisibletoBuy = 'yourAdVisibletoBuy';
static const completeDeal = 'completeDeal'; static const completeDeal = 'completeDeal';
static const uploadBankReceipt = 'uploadBankReceipt'; static const uploadBankReceipt = 'uploadBankReceipt';
@ -455,5 +455,39 @@ abstract class LocaleKeys {
static const sold = 'sold'; static const sold = 'sold';
static const noAdsShow = 'noAdsShow'; static const noAdsShow = 'noAdsShow';
static const damagePartList = 'damagePartList'; static const damagePartList = 'damagePartList';
static const searchPart = 'searchPart';
static const addSpecialService = 'addSpecialService';
static const vehicleVar = 'vehicleVar';
static const detailsVar = 'detailsVar';
static const damageVar = 'damageVar';
static const partsVar = 'partsVar';
static const additional = 'additional';
static const review = 'review';
static const adVar = 'adVar';
static const updateAd = 'updateAd';
static const createAd = 'createAd';
static const next = 'next';
static const submitAd = 'submitAd';
static const selectAdType = 'selectAdType';
static const validUntilSubscriptionExpiration = 'validUntilSubscriptionExpiration';
static const adsRemaining = 'adsRemaining';
static const youLeftAdsGivenSubscription = 'youLeftAdsGivenSubscription';
static const updateSubscription = 'updateSubscription';
static const workInProgress = 'workInProgress';
static const visitCompleted = 'visitCompleted';
static const youWantCancelAppointment = 'youWantCancelAppointment';
static const appointmentCancelledCannotUndoAction = 'appointmentCancelledCannotUndoAction';
static const appointment = 'appointment';
static const rescheduleAppointment = 'rescheduleAppointment';
static const payforAppointment = 'payforAppointment';
static const appointmentsFilter = 'appointmentsFilter';
static const searchByProvider = 'searchByProvider';
static const selectProvider = 'selectProvider';
static const searchByBranch = 'searchByBranch';
static const searchByCategory = 'searchByCategory';
static const selectCategory = 'selectCategory';
static const searchByService = 'searchByService';
static const selectServices = 'selectServices';
static const modifyPackage = 'modifyPackage';
} }

@ -15,7 +15,6 @@ import 'package:provider/provider.dart';
import 'package:sizer/sizer.dart'; import 'package:sizer/sizer.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
class BottomSheetListContent extends StatefulWidget { class BottomSheetListContent extends StatefulWidget {
const BottomSheetListContent({Key? key}) : super(key: key); const BottomSheetListContent({Key? key}) : super(key: key);
@ -50,7 +49,7 @@ class _BottomSheetListContentState extends State<BottomSheetListContent> {
TxtField( TxtField(
value: adVM.damagePartSearchValue, value: adVM.damagePartSearchValue,
errorValue: "", errorValue: "",
hint: "Search Part", hint: LocaleKeys.searchPart.tr(),
onChanged: (value) { onChanged: (value) {
adVM.onSearchChangedForDamagePart(value); adVM.onSearchChangedForDamagePart(value);
}, },
@ -121,7 +120,7 @@ class _BottomSheetListContentState extends State<BottomSheetListContent> {
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
child: ShowFillButton( child: ShowFillButton(
title: "Add Damage Part", title: LocaleKeys.addDamagePart.tr(),
onPressed: () { onPressed: () {
for (var value in adVM.vehicleDamageParts) { for (var value in adVM.vehicleDamageParts) {
if (value.isChecked! && !value.isSelected!) { if (value.isChecked! && !value.isSelected!) {
@ -194,7 +193,7 @@ class BottomSheetAdSpecialServiceContent extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Add Special Service".toText(fontSize: 24, isBold: true), LocaleKeys.addSpecialService.tr().toText(fontSize: 24, isBold: true),
8.height, 8.height,
Builder( Builder(
builder: (context) { builder: (context) {
@ -207,7 +206,7 @@ class BottomSheetAdSpecialServiceContent extends StatelessWidget {
return DropdownField( return DropdownField(
(DropValue value) => adVM.updateVehicleAdsSpecialServicesId(SelectionModel(selectedId: value.id, selectedOption: value.value, itemPrice: value.subValue)), (DropValue value) => adVM.updateVehicleAdsSpecialServicesId(SelectionModel(selectedId: value.id, selectedOption: value.value, itemPrice: value.subValue)),
list: vehicleAdsSpecialServices, list: vehicleAdsSpecialServices,
hint: "Select Service", hint: LocaleKeys.selectService.tr(),
dropdownValue: dropdownValue:
adVM.vehicleAdsSpecialServicesId.selectedId != -1 ? DropValue(adVM.vehicleAdsSpecialServicesId.selectedId, adVM.vehicleAdsSpecialServicesId.selectedOption, "") : null, adVM.vehicleAdsSpecialServicesId.selectedId != -1 ? DropValue(adVM.vehicleAdsSpecialServicesId.selectedId, adVM.vehicleAdsSpecialServicesId.selectedOption, "") : null,
); );
@ -272,7 +271,7 @@ class BottomSheetAdSpecialServiceContent extends StatelessWidget {
), ),
], ],
if (adVM.adSSTimeSlots.isNotEmpty) ...[ if (adVM.adSSTimeSlots.isNotEmpty) ...[
"Available slots".toText(fontSize: 15, isBold: true), LocaleKeys.availableSlots.tr().toText(fontSize: 15, isBold: true),
8.height, 8.height,
BuildTimeSlots( BuildTimeSlots(
timeSlots: adVM.adSSTimeSlots, timeSlots: adVM.adSSTimeSlots,
@ -280,13 +279,13 @@ class BottomSheetAdSpecialServiceContent extends StatelessWidget {
), ),
], ],
22.height, 22.height,
"Service Amount".toText(fontSize: 16, isBold: true, color: MyColors.lightTextColor), LocaleKeys.serviceAmount.tr().toText(fontSize: 16, isBold: true, color: MyColors.lightTextColor),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
adVM.vehicleAdsSpecialServicesId.itemPrice.toText(fontSize: 20, isBold: true), adVM.vehicleAdsSpecialServicesId.itemPrice.toText(fontSize: 20, isBold: true),
SizedBox(width: 1.w), SizedBox(width: 1.w),
"SAR".toText(fontSize: 12, isBold: true, color: MyColors.lightTextColor).paddingOnly(bottom: 2), LocaleKeys.sar.tr().toText(fontSize: 12, isBold: true, color: MyColors.lightTextColor).paddingOnly(bottom: 2),
], ],
), ),
], ],
@ -298,7 +297,7 @@ class BottomSheetAdSpecialServiceContent extends StatelessWidget {
width: double.infinity, width: double.infinity,
child: ShowFillButton( child: ShowFillButton(
backgroundColor: !isButtonTappable(adVM) ? MyColors.lightTextColor.withOpacity(0.6) : MyColors.primaryColor, backgroundColor: !isButtonTappable(adVM) ? MyColors.lightTextColor.withOpacity(0.6) : MyColors.primaryColor,
title: "Add Service", title: LocaleKeys.addService.tr(),
onPressed: () { onPressed: () {
if (!isButtonTappable(adVM)) { if (!isButtonTappable(adVM)) {
return; return;

@ -2,11 +2,13 @@ import 'package:flutter/material.dart';
import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/utils/enums.dart'; import 'package:mc_common_app/utils/enums.dart';
import 'package:mc_common_app/view_models/ad_view_model.dart'; import 'package:mc_common_app/view_models/ad_view_model.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:easy_localization/easy_localization.dart';
class CreateAdProgressSteps extends StatelessWidget { class CreateAdProgressSteps extends StatelessWidget {
const CreateAdProgressSteps({Key? key}) : super(key: key); const CreateAdProgressSteps({Key? key}) : super(key: key);
@ -66,10 +68,10 @@ class CreateAdProgressSteps extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
buildStep(MyAssets.carIcon, "Vehicle \n Details", getProgressStepNumber(currentStep: adVM.currentProgressStep) >= 1), buildStep(MyAssets.carIcon, (LocaleKeys.vehicleVar.tr() + " \n" + LocaleKeys.detailsVar.tr()), getProgressStepNumber(currentStep: adVM.currentProgressStep) >= 1),
buildStep(MyAssets.carHitIcon, "Damage \n Parts", getProgressStepNumber(currentStep: adVM.currentProgressStep) >= 2), buildStep(MyAssets.carHitIcon, (LocaleKeys.damageVar.tr() + " \n" + LocaleKeys.partsVar.tr()), getProgressStepNumber(currentStep: adVM.currentProgressStep) >= 2),
buildStep(MyAssets.clockIcon, "Additional \n Details", getProgressStepNumber(currentStep: adVM.currentProgressStep) >= 3), buildStep(MyAssets.clockIcon, (LocaleKeys.additional.tr() + " \n" + LocaleKeys.detailsVar.tr()), getProgressStepNumber(currentStep: adVM.currentProgressStep) >= 3),
buildStep(MyAssets.reviewIcon, "Review \n Ad", getProgressStepNumber(currentStep: adVM.currentProgressStep) >= 4), buildStep(MyAssets.reviewIcon, (LocaleKeys.review.tr() + " \n"+ LocaleKeys.adVar.tr()), getProgressStepNumber(currentStep: adVM.currentProgressStep) >= 4),
], ],
), ),
], ],

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/utils/enums.dart'; import 'package:mc_common_app/utils/enums.dart';
import 'package:mc_common_app/utils/navigator.dart'; import 'package:mc_common_app/utils/navigator.dart';
@ -13,6 +14,8 @@ import 'package:mc_common_app/widgets/button/show_fill_button.dart';
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart'; import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:easy_localization/easy_localization.dart';
class CreateAdView extends StatefulWidget { class CreateAdView extends StatefulWidget {
const CreateAdView({Key? key}) : super(key: key); const CreateAdView({Key? key}) : super(key: key);
@ -34,7 +37,7 @@ class _CreateAdViewState extends State<CreateAdView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: adVM.isAdEditEnabled ? "Update Ad": "Create Ad", title: adVM.isAdEditEnabled ? LocaleKeys.updateAd.tr(): LocaleKeys.createAd.tr(),
isRemoveBackButton: false, isRemoveBackButton: false,
isDrawerEnabled: false, isDrawerEnabled: false,
onBackButtonTapped: () => adVM.onBackButtonPressed(context), onBackButtonTapped: () => adVM.onBackButtonPressed(context),
@ -77,7 +80,7 @@ class BuildFooterButton extends StatelessWidget {
return SizedBox( return SizedBox(
width: double.infinity, width: double.infinity,
child: ShowFillButton( child: ShowFillButton(
title: "Next", title: LocaleKeys.next.tr(),
onPressed: () { onPressed: () {
adVm.updateCurrentStep(context); adVm.updateCurrentStep(context);
}, },
@ -90,7 +93,7 @@ class BuildFooterButton extends StatelessWidget {
child: ShowFillButton( child: ShowFillButton(
txtColor: MyColors.black, txtColor: MyColors.black,
maxHeight: 55, maxHeight: 55,
title: "Cancel", title: LocaleKeys.cancel.tr(),
onPressed: () { onPressed: () {
adVm.resetValues(); adVm.resetValues();
pop(context); pop(context);
@ -102,7 +105,7 @@ class BuildFooterButton extends StatelessWidget {
Expanded( Expanded(
child: ShowFillButton( child: ShowFillButton(
maxHeight: 55, maxHeight: 55,
title: "Next", title: LocaleKeys.next.tr(),
onPressed: () { onPressed: () {
adVm.updateCurrentStep(context); adVm.updateCurrentStep(context);
}, },
@ -118,7 +121,7 @@ class BuildFooterButton extends StatelessWidget {
child: ShowFillButton( child: ShowFillButton(
txtColor: MyColors.black, txtColor: MyColors.black,
maxHeight: 55, maxHeight: 55,
title: "Cancel", title: LocaleKeys.cancel.tr(),
onPressed: () { onPressed: () {
adVm.resetValues(); adVm.resetValues();
pop(context); pop(context);
@ -130,7 +133,7 @@ class BuildFooterButton extends StatelessWidget {
Expanded( Expanded(
child: ShowFillButton( child: ShowFillButton(
maxHeight: 55, maxHeight: 55,
title: "Next", title: LocaleKeys.next.tr(),
onPressed: () { onPressed: () {
adVm.updateCurrentStep(context); adVm.updateCurrentStep(context);
}, },
@ -146,7 +149,7 @@ class BuildFooterButton extends StatelessWidget {
child: ShowFillButton( child: ShowFillButton(
txtColor: MyColors.black, txtColor: MyColors.black,
maxHeight: 55, maxHeight: 55,
title: "Cancel", title: LocaleKeys.cancel.tr(),
onPressed: () { onPressed: () {
adVm.resetValues(); adVm.resetValues();
pop(context); pop(context);
@ -158,7 +161,7 @@ class BuildFooterButton extends StatelessWidget {
Expanded( Expanded(
child: ShowFillButton( child: ShowFillButton(
maxHeight: 55, maxHeight: 55,
title: "Submit Ad", title: LocaleKeys.submitAd.tr(),
onPressed: () { onPressed: () {
adVm.updateCurrentStep(context); adVm.updateCurrentStep(context);
}, },

@ -3,6 +3,7 @@ import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/config/routes.dart'; import 'package:mc_common_app/config/routes.dart';
import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/main.dart'; import 'package:mc_common_app/main.dart';
import 'package:mc_common_app/models/advertisment_models/vehicle_details_models.dart'; import 'package:mc_common_app/models/advertisment_models/vehicle_details_models.dart';
import 'package:mc_common_app/models/general_models/widgets_models.dart'; import 'package:mc_common_app/models/general_models/widgets_models.dart';
@ -14,6 +15,8 @@ import 'package:mc_common_app/widgets/bottom_sheet.dart';
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart'; import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:easy_localization/easy_localization.dart';
class SelectAdTypeView extends StatelessWidget { class SelectAdTypeView extends StatelessWidget {
final bool isProvider; final bool isProvider;
@ -61,7 +64,7 @@ class SelectAdTypeView extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: "Select Ad Type", title: LocaleKeys.selectAdType.tr(),
profileImageUrl: MyAssets.bnCar, profileImageUrl: MyAssets.bnCar,
isRemoveBackButton: false, isRemoveBackButton: false,
isDrawerEnabled: false, isDrawerEnabled: false,
@ -106,14 +109,14 @@ class SelectAdTypeView extends StatelessWidget {
if (isProvider) ...[ if (isProvider) ...[
Row( Row(
children: [ children: [
"Duration: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true), LocaleKeys.duration.tr().toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
"Valid Until Subscription Expiration".toText(fontSize: 13, isBold: true), LocaleKeys.validUntilSubscriptionExpiration.tr() .toText(fontSize: 13, isBold: true),
], ],
).paddingOnly(top: 5, bottom: 5), ).paddingOnly(top: 5, bottom: 5),
] else ...[ ] else ...[
Row( Row(
children: [ children: [
"Duration: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true), LocaleKeys.duration.tr().toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
adVM.vehicleAdDurationId.selectedOption.toText(fontSize: 13, isBold: true), adVM.vehicleAdDurationId.selectedOption.toText(fontSize: 13, isBold: true),
const Icon(Icons.keyboard_arrow_down_sharp, color: MyColors.darkPrimaryColor, size: 20), const Icon(Icons.keyboard_arrow_down_sharp, color: MyColors.darkPrimaryColor, size: 20),
], ],
@ -127,7 +130,7 @@ class SelectAdTypeView extends StatelessWidget {
2.width, 2.width,
Padding( Padding(
padding: const EdgeInsets.only(bottom: 4), padding: const EdgeInsets.only(bottom: 4),
child: "SAR".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true), child: LocaleKeys.sar.tr().toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
), ),
], ],
), ),
@ -154,21 +157,21 @@ class SelectAdTypeView extends StatelessWidget {
Row( Row(
children: [ children: [
"5 of 10 ".toText(fontSize: 29, isBold: true, letterSpacing: 0, height: 1), "5 of 10 ".toText(fontSize: 29, isBold: true, letterSpacing: 0, height: 1),
"Ads Remaining ".toText(fontSize: 17, color: MyColors.lightTextColor, isBold: true), LocaleKeys.adsRemaining.tr().toText(fontSize: 17, color: MyColors.lightTextColor, isBold: true),
], ],
), ),
const Text.rich( Text.rich(
TextSpan( TextSpan(
children: [ children: [
TextSpan( TextSpan(
text: "You have left with 05 out of 50 ads given in the subscription. ", text: LocaleKeys.youLeftAdsGivenSubscription.tr(),
style: TextStyle( style: const TextStyle(
fontSize: 14, fontSize: 14,
color: MyColors.lightTextColor, color: MyColors.lightTextColor,
)), )),
TextSpan( TextSpan(
text: "Update Subscription", text: LocaleKeys.updateSubscription.tr(),
style: TextStyle( style: const TextStyle(
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/models/appointments_models/appointment_list_model.dart'; import 'package:mc_common_app/models/appointments_models/appointment_list_model.dart';
import 'package:mc_common_app/models/services_models/service_model.dart'; import 'package:mc_common_app/models/services_models/service_model.dart';
import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/theme/colors.dart';
@ -13,6 +14,8 @@ import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
import 'package:mc_common_app/widgets/common_widgets/card_button_with_icon.dart'; import 'package:mc_common_app/widgets/common_widgets/card_button_with_icon.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:easy_localization/easy_localization.dart';
class AppointmentDetailView extends StatelessWidget { class AppointmentDetailView extends StatelessWidget {
final AppointmentListModel appointmentListModel; final AppointmentListModel appointmentListModel;
@ -47,7 +50,7 @@ class AppointmentDetailView extends StatelessWidget {
color: MyColors.grey98Color.withOpacity(0.3), color: MyColors.grey98Color.withOpacity(0.3),
textColor: MyColors.lightTextColor, textColor: MyColors.lightTextColor,
onPressed: () {}, onPressed: () {},
text: "Work In Progress", text: LocaleKeys.workInProgress.tr(),
), ),
], ],
), ),
@ -68,7 +71,7 @@ class AppointmentDetailView extends StatelessWidget {
); );
} }
}, },
text: "Pay Now", text: LocaleKeys.payNow.tr(),
), ),
], ],
), ),
@ -90,7 +93,7 @@ class AppointmentDetailView extends StatelessWidget {
onPressed: () { onPressed: () {
context.read<AppointmentsVM>().onConfirmAppointmentPressed(context: context, appointmentId: appointmentListModel.id); context.read<AppointmentsVM>().onConfirmAppointmentPressed(context: context, appointmentId: appointmentListModel.id);
}, },
text: "Confirm"), text: LocaleKeys.confirm.tr()),
], ],
), ),
); );
@ -112,7 +115,7 @@ class AppointmentDetailView extends StatelessWidget {
color: MyColors.grey98Color.withOpacity(0.3), color: MyColors.grey98Color.withOpacity(0.3),
textColor: MyColors.lightTextColor, textColor: MyColors.lightTextColor,
onPressed: () {}, onPressed: () {},
text: "Visit Completed", text: LocaleKeys.visitCompleted.tr(),
), ),
], ],
), ),
@ -144,7 +147,7 @@ class AppointmentDetailView extends StatelessWidget {
onPressed: () { onPressed: () {
context.read<AppointmentsVM>().onConfirmAppointmentPressed(context: context, appointmentId: appointmentListModel.id); context.read<AppointmentsVM>().onConfirmAppointmentPressed(context: context, appointmentId: appointmentListModel.id);
}, },
text: "Confirm"), text: LocaleKeys.confirm.tr()),
], ],
), ),
); );
@ -157,12 +160,12 @@ class AppointmentDetailView extends StatelessWidget {
final appointmentsVm = context.read<AppointmentsVM>(); final appointmentsVm = context.read<AppointmentsVM>();
return actionConfirmationBottomSheet( return actionConfirmationBottomSheet(
context: context, context: context,
title: "Do you want to cancel this appointment?".toText(fontSize: 28, isBold: true, letterSpacing: -1.44), title: LocaleKeys.youWantCancelAppointment.tr().toText(fontSize: 28, isBold: true, letterSpacing: -1.44),
subtitle: "Your appointment will be cancelled and you cannot undo this action.", subtitle: LocaleKeys.appointmentCancelledCannotUndoAction.tr(),
actionButtonYes: Expanded( actionButtonYes: Expanded(
child: ShowFillButton( child: ShowFillButton(
maxHeight: 55, maxHeight: 55,
title: "Yes", title: LocaleKeys.yes.tr(),
fontSize: 15, fontSize: 15,
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
@ -175,7 +178,7 @@ class AppointmentDetailView extends StatelessWidget {
maxHeight: 55, maxHeight: 55,
isFilled: false, isFilled: false,
borderColor: MyColors.darkPrimaryColor, borderColor: MyColors.darkPrimaryColor,
title: "No", title: LocaleKeys.no.tr(),
txtColor: MyColors.darkPrimaryColor, txtColor: MyColors.darkPrimaryColor,
fontSize: 15, fontSize: 15,
onPressed: () { onPressed: () {
@ -191,7 +194,7 @@ class AppointmentDetailView extends StatelessWidget {
AppointmentsVM appointmentsVM = context.read<AppointmentsVM>(); AppointmentsVM appointmentsVM = context.read<AppointmentsVM>();
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: "Appointment", title: LocaleKeys.appointment.tr(),
profileImageUrl: MyAssets.bnCar, profileImageUrl: MyAssets.bnCar,
isRemoveBackButton: false, isRemoveBackButton: false,
isDrawerEnabled: false, isDrawerEnabled: false,
@ -254,7 +257,7 @@ class AppointmentDetailView extends StatelessWidget {
children: [ children: [
((service.currentTotalServicePrice).toString()).toText(fontSize: 25, isBold: true), ((service.currentTotalServicePrice).toString()).toText(fontSize: 25, isBold: true),
2.width, 2.width,
"SAR".toText(color: MyColors.lightTextColor, fontSize: 16, isBold: true).paddingOnly(bottom: 5), LocaleKeys.sar.tr().toText(color: MyColors.lightTextColor, fontSize: 16, isBold: true).paddingOnly(bottom: 5),
const Icon(Icons.arrow_drop_down, size: 30) const Icon(Icons.arrow_drop_down, size: 30)
], ],
).onPress(() => appointmentsVM.priceBreakDownClicked(context, service)), ).onPress(() => appointmentsVM.priceBreakDownClicked(context, service)),
@ -268,7 +271,7 @@ class AppointmentDetailView extends StatelessWidget {
Row( Row(
children: [ children: [
CardButtonWithIcon( CardButtonWithIcon(
title: "Reschedule Appointment", title: LocaleKeys.rescheduleAppointment.tr(),
onCardTapped: () { onCardTapped: () {
context.read<AppointmentsVM>().onRescheduleAppointmentPressed(context: context, appointmentListModel: appointmentListModel); context.read<AppointmentsVM>().onRescheduleAppointmentPressed(context: context, appointmentListModel: appointmentListModel);
}, },
@ -277,7 +280,7 @@ class AppointmentDetailView extends StatelessWidget {
if (appointmentListModel.appointmentStatusEnum == AppointmentStatusEnum.booked) ...[ if (appointmentListModel.appointmentStatusEnum == AppointmentStatusEnum.booked) ...[
10.width, 10.width,
CardButtonWithIcon( CardButtonWithIcon(
title: "Pay for Appointment", title: LocaleKeys.payforAppointment.tr(),
onCardTapped: () { onCardTapped: () {
context.read<AppointmentsVM>().onConfirmAppointmentPressed(context: context, appointmentId: appointmentListModel.id); context.read<AppointmentsVM>().onConfirmAppointmentPressed(context: context, appointmentId: appointmentListModel.id);
}, },

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/models/general_models/widgets_models.dart'; import 'package:mc_common_app/models/general_models/widgets_models.dart';
import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/utils/enums.dart'; import 'package:mc_common_app/utils/enums.dart';
@ -12,7 +13,7 @@ import 'package:mc_common_app/view_models/appointments_view_model.dart';
import 'package:mc_common_app/widgets/button/show_fill_button.dart'; import 'package:mc_common_app/widgets/button/show_fill_button.dart';
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart'; import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
import 'package:mc_common_app/widgets/common_widgets/search_entity_widget.dart'; import 'package:mc_common_app/widgets/common_widgets/search_entity_widget.dart';
import 'package:mc_common_app/widgets/common_widgets/slider_widget.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart'; import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -47,7 +48,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: "Appointments Filter", title: LocaleKeys.appointmentsFilter.tr(),
profileImageUrl: MyAssets.bnCar, profileImageUrl: MyAssets.bnCar,
isRemoveBackButton: false, isRemoveBackButton: false,
isDrawerEnabled: false, isDrawerEnabled: false,
@ -69,7 +70,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
children: [ children: [
20.height, 20.height,
SearchEntityWidget( SearchEntityWidget(
title: "Search By Provider", title: LocaleKeys.searchByProvider.tr(),
actionWidget: Builder( actionWidget: Builder(
builder: (context) { builder: (context) {
return DropdownField( return DropdownField(
@ -78,7 +79,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
dropdownValue: appointmentsVM.appointmentFilterSelectedProviderId.selectedId != -1 dropdownValue: appointmentsVM.appointmentFilterSelectedProviderId.selectedId != -1
? DropValue(appointmentsVM.appointmentFilterSelectedProviderId.selectedId, appointmentsVM.appointmentFilterSelectedProviderId.selectedOption, "") ? DropValue(appointmentsVM.appointmentFilterSelectedProviderId.selectedId, appointmentsVM.appointmentFilterSelectedProviderId.selectedOption, "")
: null, : null,
hint: "Select Provider", hint: LocaleKeys.selectProvider.tr(),
); );
}, },
), ),
@ -103,7 +104,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
if (appointmentsVM.appointmentFilterProviderSearchHistory.isNotEmpty) ...[ if (appointmentsVM.appointmentFilterProviderSearchHistory.isNotEmpty) ...[
const Divider(thickness: 1.2).paddingOnly(top: 5, bottom: 5), const Divider(thickness: 1.2).paddingOnly(top: 5, bottom: 5),
SearchEntityWidget( SearchEntityWidget(
title: "Search By Branch", title: LocaleKeys.searchByBranch.tr(),
actionWidget: Builder( actionWidget: Builder(
builder: (context) { builder: (context) {
return DropdownField( return DropdownField(
@ -112,7 +113,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
dropdownValue: appointmentsVM.appointmentFilterSelectedBranchId.selectedId != -1 dropdownValue: appointmentsVM.appointmentFilterSelectedBranchId.selectedId != -1
? DropValue(appointmentsVM.appointmentFilterSelectedBranchId.selectedId, appointmentsVM.appointmentFilterSelectedBranchId.selectedOption, "") ? DropValue(appointmentsVM.appointmentFilterSelectedBranchId.selectedId, appointmentsVM.appointmentFilterSelectedBranchId.selectedOption, "")
: null, : null,
hint: "Select Branch", hint: LocaleKeys.selectBranch.tr(),
); );
}, },
), ),
@ -126,7 +127,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
], ],
const Divider(thickness: 1.2).paddingOnly(top: 5, bottom: 5), const Divider(thickness: 1.2).paddingOnly(top: 5, bottom: 5),
SearchEntityWidget( SearchEntityWidget(
title: "Search By Category", title: LocaleKeys.searchByCategory.tr(),
actionWidget: Builder( actionWidget: Builder(
builder: (context) { builder: (context) {
return DropdownField( return DropdownField(
@ -135,7 +136,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
dropdownValue: appointmentsVM.appointmentFilterSelectedCategoryId.selectedId != -1 dropdownValue: appointmentsVM.appointmentFilterSelectedCategoryId.selectedId != -1
? DropValue(appointmentsVM.appointmentFilterSelectedCategoryId.selectedId, appointmentsVM.appointmentFilterSelectedCategoryId.selectedOption, "") ? DropValue(appointmentsVM.appointmentFilterSelectedCategoryId.selectedId, appointmentsVM.appointmentFilterSelectedCategoryId.selectedOption, "")
: null, : null,
hint: "Select Category", hint: LocaleKeys.selectCategory.tr(),
); );
}, },
), ),
@ -148,7 +149,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
), ),
const Divider(thickness: 1.2).paddingOnly(top: 5, bottom: 5), const Divider(thickness: 1.2).paddingOnly(top: 5, bottom: 5),
SearchEntityWidget( SearchEntityWidget(
title: "Search By Service", title: LocaleKeys.searchByService.tr(),
actionWidget: Builder(builder: (context) { actionWidget: Builder(builder: (context) {
return DropdownField( return DropdownField(
(DropValue value) => appointmentsVM.updateAppointmentFilterSelectedServiceId(SelectionModel(selectedId: value.id, selectedOption: value.value), isForSearch: true), (DropValue value) => appointmentsVM.updateAppointmentFilterSelectedServiceId(SelectionModel(selectedId: value.id, selectedOption: value.value), isForSearch: true),
@ -156,7 +157,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
dropdownValue: appointmentsVM.appointmentFilterSelectedServiceId.selectedId != -1 dropdownValue: appointmentsVM.appointmentFilterSelectedServiceId.selectedId != -1
? DropValue(appointmentsVM.appointmentFilterSelectedServiceId.selectedId, appointmentsVM.appointmentFilterSelectedServiceId.selectedOption, "") ? DropValue(appointmentsVM.appointmentFilterSelectedServiceId.selectedId, appointmentsVM.appointmentFilterSelectedServiceId.selectedOption, "")
: null, : null,
hint: "Select Services", hint: LocaleKeys.selectServices.tr(),
); );
}), }),
historyContent: appointmentsVM.appointmentFilterServicesSearchHistory, historyContent: appointmentsVM.appointmentFilterServicesSearchHistory,
@ -175,7 +176,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
Expanded( Expanded(
child: ShowFillButton( child: ShowFillButton(
maxHeight: 55, maxHeight: 55,
title: "Search", title: LocaleKeys.search.tr(),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
appointmentsVM.getAppointmentsBasedOnFilters(); appointmentsVM.getAppointmentsBasedOnFilters();
@ -190,7 +191,7 @@ class _AppointmentsFilterViewState extends State<AppointmentsFilterView> {
8.height, 8.height,
InkWell( InkWell(
onTap: () => appointmentsVM.clearAppointmentFilters(), onTap: () => appointmentsVM.clearAppointmentFilters(),
child: "Clear Filters".toText( child: LocaleKeys.clearFilters.tr().toText(
fontSize: 14, fontSize: 14,
isBold: true, isBold: true,
color: MyColors.darkPrimaryColor, color: MyColors.darkPrimaryColor,

Loading…
Cancel
Save