New UI Implemented arabic check

mirza_dev
devmirza121 4 years ago
parent 0f185d4f8d
commit 3b6eb17adc

@ -103,7 +103,7 @@ class ServiceProviderBranch {
final int? id; final int? id;
int? countryID; int? countryID;
final String? countryName; String? countryName;
final int? cityId; final int? cityId;
final dynamic? cityName; final dynamic? cityName;
final String? branchName; final String? branchName;

@ -33,7 +33,6 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
widget.branchData.serviceProviderServices!.forEach((element) { widget.branchData.serviceProviderServices!.forEach((element) {
categories.add( categories.add(
new CategoryData( new CategoryData(
id: element.categoryId, id: element.categoryId,
@ -75,7 +74,7 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: titleWidget(icons + "ic_branchs.svg", "Branch Info"), child: titleWidget(icons + "ic_branchs.svg", LocaleKeys.branchInfo),
), ),
IconButton( IconButton(
onPressed: () { onPressed: () {
@ -90,11 +89,11 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
8.height, 8.height,
Column( Column(
children: [ children: [
showData("Country:", widget.branchData.countryID.toString()), showData(LocaleKeys.country.tr() + ":", widget.branchData.countryName.toString()),
showData("City", widget.branchData.cityId.toString()), showData(LocaleKeys.city.tr() + ":", widget.branchData.cityName.toString()),
showData("Branch Name:", widget.branchData.branchName.toString()), showData(LocaleKeys.branchName.tr() + ":", widget.branchData.branchName.toString()),
showData("Branch Description:", widget.branchData.branchDescription.toString()), showData(LocaleKeys.branchDescription.tr() + ":", widget.branchData.branchDescription.toString()),
showData("Address:", widget.branchData.address.toString()), showData(LocaleKeys.address.tr() + ":", widget.branchData.address.toString()),
], ],
), ),
Container( Container(
@ -115,7 +114,11 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
ListView.builder( ListView.builder(
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
child: ("- " + categories[pIndex].services![index].serviceName.toString()).toText14(), child: ("- " +
(EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
? categories[pIndex].services![index].serviceNameN.toString()
: categories[pIndex].services![index].serviceName.toString()))
.toText14(),
); );
}, },
itemCount: categories[pIndex].services?.length, itemCount: categories[pIndex].services?.length,
@ -142,7 +145,7 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
Padding( Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: ShowFillButton( child: ShowFillButton(
title: "Edit Services", title: LocaleKeys.editServices,
maxWidth: double.infinity, maxWidth: double.infinity,
onPressed: () { onPressed: () {
navigateWithName( navigateWithName(

@ -85,7 +85,7 @@ class _BranchListPageState extends State<BranchListPage> {
Row( Row(
children: [ children: [
Icon( Icon(
Icons.place, Icons.place,
size: 12, size: 12,
color: MyColors.darkPrimaryColor, color: MyColors.darkPrimaryColor,
), ),
@ -143,7 +143,8 @@ class _BranchListPageState extends State<BranchListPage> {
).toContainer().onPress(() async { ).toContainer().onPress(() async {
// await navigateWithName(context, AppRoutes.defineBranch, arguments: snapshot.data!.data![index]); // await navigateWithName(context, AppRoutes.defineBranch, arguments: snapshot.data!.data![index]);
// setState(() {}); // setState(() {});
snapshot.data!.data!.serviceProviderBranch![index].countryID=snapshot.data!.data!.countryID; snapshot.data!.data!.serviceProviderBranch![index].countryID = snapshot.data!.data!.countryID;
snapshot.data!.data!.serviceProviderBranch![index].countryName = snapshot.data!.data!.countryName;
await navigateWithName(context, AppRoutes.branchDetail, arguments: snapshot.data!.data!.serviceProviderBranch![index]); await navigateWithName(context, AppRoutes.branchDetail, arguments: snapshot.data!.data!.serviceProviderBranch![index]);
setState(() {}); setState(() {});
}); });

@ -55,7 +55,7 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
country = await UserApiClent().getAllCountries(); country = await UserApiClent().getAllCountries();
setState(() { setState(() {
country!.data?.forEach((element) { country!.data?.forEach((element) {
if (widget.branchData!.id != null) { if (widget.branchData != null) if (widget.branchData!.id != null) {
if (element.id == widget.branchData!.countryID) { if (element.id == widget.branchData!.countryID) {
countryValue = new DropValue( countryValue = new DropValue(
element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? (element.countryNameN ?? "") : (element.countryName ?? ""), element.countryCode ?? ""); element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? (element.countryNameN ?? "") : (element.countryName ?? ""), element.countryCode ?? "");
@ -64,7 +64,7 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
countryDropList.add( countryDropList.add(
new DropValue(element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? (element.countryNameN ?? "") : (element.countryName ?? ""), element.countryCode ?? "")); new DropValue(element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? (element.countryNameN ?? "") : (element.countryName ?? ""), element.countryCode ?? ""));
}); });
if (widget.branchData!.id != null) fetchCites(); if (widget.branchData != null) if (widget.branchData!.id != null) fetchCites();
}); });
} }
@ -76,7 +76,7 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
cities = await UserApiClent().getAllCites(countryId.toString()); cities = await UserApiClent().getAllCites(countryId.toString());
setState(() { setState(() {
cities!.data?.forEach((element) { cities!.data?.forEach((element) {
if (widget.branchData!.id != null) { if (widget.branchData != null) if (widget.branchData!.id != null) {
if (element.id == widget.branchData!.cityId) { if (element.id == widget.branchData!.cityId) {
address = widget.branchData!.address!; address = widget.branchData!.address!;
branchName = widget.branchData!.branchName!; branchName = widget.branchData!.branchName!;
@ -237,9 +237,9 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20),
child: ShowFillButton( child: ShowFillButton(
title: widget.branchData!.id == null ? LocaleKeys.createBranch.tr() : LocaleKeys.updateBranch.tr(), title: widget.branchData != null ? (widget.branchData!.id == null ? LocaleKeys.createBranch.tr() : LocaleKeys.updateBranch.tr()) : LocaleKeys.createBranch.tr(),
onPressed: () async { onPressed: () async {
if (widget.branchData!.id == null) { if (widget.branchData == null) {
Utils.showLoading(context); Utils.showLoading(context);
MResponse res = await BranchApiClent().createBranch(branchName, branchDescription, cityId.toString(), address, latitude.toString(), longitude.toString()); MResponse res = await BranchApiClent().createBranch(branchName, branchDescription, cityId.toString(), address, latitude.toString(), longitude.toString());
Utils.hideLoading(context); Utils.hideLoading(context);

@ -130,7 +130,7 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
), ),
Padding( Padding(
padding: const EdgeInsets.only(left: 20, right: 20, top: 4, bottom: 8), padding: const EdgeInsets.only(left: 20, right: 20, top: 4, bottom: 8),
child: "Please enter the detail for commercial records and attach the license images".toText14(color: MyColors.lightTextColor, textAlign: TextAlign.center), child: LocaleKeys.enter_licence_detail.tr().toText14(color: MyColors.lightTextColor, textAlign: TextAlign.center),
), ),
TxtField( TxtField(
hint: LocaleKeys.description.tr(), hint: LocaleKeys.description.tr(),

@ -34,21 +34,21 @@
"change": "تغيير", "change": "تغيير",
"verifyAccount": "التحقق من الحساب", "verifyAccount": "التحقق من الحساب",
"login": "تسجيل دخول", "login": "تسجيل دخول",
"log_in": "Log In", "log_in": "تسجيل الدخول",
"welcomeMessage": "مرحبا", "welcomeMessage": "مرحبا",
"welcomeDes": "You one stop place all your car needs", "welcomeDes": "أنت مكان واحد لكل ما تحتاجه سيارتك",
"forgetPass": "نسيت كلمة المرور ؟", "forgetPass": "نسيت كلمة المرور ؟",
"enterPhoneNumber": "رقم جوال ", "enterPhoneNumber": "رقم جوال ",
"phoneNumberVerified": "تم التحقق من الجوال", "phoneNumberVerified": "تم التحقق من الجوال",
"verifyNewPassword": "التحقق من كلمة المرور", "verifyNewPassword": "التحقق من كلمة المرور",
"EnterPass": "ادخل كلمة المرور", "EnterPass": "ادخل كلمة المرور",
"send": "Send", "send": "إرسال",
"retrivePassword": "Retrive password by one of following method", "retrivePassword": "استرجع كلمة المرور بإحدى الطرق التالية",
"retriveOnPhone": "We will send the opt to your registered mobile number", "retriveOnPhone": "سوف نرسل الاختيار إلى رقم هاتفك المحمول المسجل",
"retriveOnEmail": "We will send the opt to your registered email address", "retriveOnEmail": "سوف نرسل الاختيار إلى عنوان بريدك الإلكتروني المسجل",
"enterPhoneForVerfication": "Please enter your phone number We will send you the verification code", "enterPhoneForVerfication": "الرجاء إدخال رقم هاتفك وسنرسل لك رمز التحقق",
"selectYourCountry": "Select Your Country", "selectYourCountry": "اختر بلدك",
"welcomeBack": "Welcome Back!!!", "welcomeBack": "مرحبًا بعودتك!!!",
"alreadySigned": " تم تسجيل الدخول", "alreadySigned": " تم تسجيل الدخول",
"emailChangedSuccessfully": "تم تغيير الايميل بنجاح", "emailChangedSuccessfully": "تم تغيير الايميل بنجاح",
"passwordIsUpdated": "تم تحجيث كلمة المرور", "passwordIsUpdated": "تم تحجيث كلمة المرور",
@ -164,10 +164,14 @@
"remove": "إزالة", "remove": "إزالة",
"no_branch": "لم يتم إضافة فرع حتى الآن", "no_branch": "لم يتم إضافة فرع حتى الآن",
"login_once": "الرجاء تسجيل الدخول مرة واحدة", "login_once": "الرجاء تسجيل الدخول مرة واحدة",
"defineLicenese": "Upload Licenses and Certificates", "defineLicenese": "تحميل التراخيص والشهادات",
"description": "Description", "description": "وصف",
"attachFile": "Attach File", "attachFile": "أرفق ملف",
"branchLocation": "Branch info and Location", "branchLocation": "معلومات الفرع والموقع",
"tapToEdit": "Tap to edit", "tapToEdit": "انقر للتعديل",
"myServiceBranches": "My Service Branches" "myServiceBranches": "فروع خدمتي",
"enter_licence_detail": "الرجاء إدخال تفاصيل السجلات التجارية وإرفاق صور الترخيص",
"country": "بلد",
"city": "مدينة",
"editServices": "تحرير الخدمات"
} }

@ -169,5 +169,9 @@
"attachFile": "Attach File", "attachFile": "Attach File",
"branchLocation": "Branch info and Location", "branchLocation": "Branch info and Location",
"tapToEdit": "Tap to edit", "tapToEdit": "Tap to edit",
"myServiceBranches": "My Service Branches" "myServiceBranches": "My Service Branches",
"enter_licence_detail": "Please enter the detail for commercial records and attach the license images",
"country": "country",
"city": "city",
"editServices": "Edit Services"
} }

Loading…
Cancel
Save