From a858d8764ac5e3140866af4fc1b49b91e357822d Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Thu, 18 Nov 2021 16:27:41 +0300 Subject: [PATCH 1/7] fixed issues --- .../pharmacy_module/lakum/akum_transfer.png | Bin 0 -> 1621 bytes lib/config/localized_values.dart | 1 + .../pharmacies/screens/lakum-main-page.dart | 17 +-- .../product-details/availability_info.dart | 107 +++++++++--------- .../product-details/footor/footer-widget.dart | 2 +- .../product-name-and-price.dart | 41 ++++--- .../widgets/lacum-banner-widget.dart | 30 ++--- lib/uitl/translations_delegate_base.dart | 2 + 8 files changed, 110 insertions(+), 90 deletions(-) create mode 100644 assets/images/pharmacy_module/lakum/akum_transfer.png diff --git a/assets/images/pharmacy_module/lakum/akum_transfer.png b/assets/images/pharmacy_module/lakum/akum_transfer.png new file mode 100644 index 0000000000000000000000000000000000000000..30785b087b57b816d5adad6f4a04ba864fdb420e GIT binary patch literal 1621 zcmV-b2CDgqP)1&UoBwY$uC z?(E)Sc6Mf%Wp_JaGP}%ueBU|WIrrSV48-_i9oB6I#$ac7V1=m|CYL;TfDwl0NAUYJ z4}3T0^`04Nn;r=l4ijz%J?&XXO0JPHyp3(`dfL-ANTiqHpx)K$KB2c?R0**5B-UUy z*D%18>IIH3At0HU!NyMglyfFVA-`_`KUuTGMLdMukAS!*-Nmm`eF1 zJdd_ixv;%1u0&QGz-uE;cdt?heWPehm0nX88n}C+)MFKdhpdx_;Wr93K8r#o9} ztz{9wY?EX#nXjYelB9#lEiZuQcz9z+1#Ei!8TkF`W%#D`3qN=R`ffQSc&Hn08Lt&( zs3C79a>D=EeCubpIE6?@9E(~W!M{^f1&?NDL65Hka!gxb)O8CEeYFn>5HBDJe1_u* zG}1KZ^RA;(QUxg)Hpou4+&DJgnlPl5La61*v$3WbdRCqX*WG@hizBHFR(l?XvJZ>E zGw(qH0TSe80L@Y{f#Zr^kQ1Qasa@!kl3>rTOC2?13S z;tc+gwMY;z47a#fOE`;g1a$^(BR|=jEAKJW) zqJ*Su@2=+zrS{CkZsq=a`Wy{P%{R4D9MSe3&YOwby5OUDrW3wxi&U* zwqw3!^Oc#4kzm)=_o)Y;g_l+q!tRe=g@M2O7Xy2VpmsUO#e#%7j%c0`h?~Oe-J3YB=JPUz`DoSny?cto$Z14Uw#l5xn&dB^V3e<6Gx>XYM|n=YN$DS z00u|@T9SZT3{VeD+*bk!zBKbK_-Dus)eY}0W+S2SQ&xdi5L?FFqptnG?Mhzo;dUa{ zmlXUl0zLqmL?sci0s&kkZ(vc!%GUuB17saA_h0+-$bhe}{Pa-c3Wy~K3Vv`Ls*mmW z%SKkIDz5|T3zmebjt$88&h{aXCSRX%O?0i?-49$~^9tZ;eGg@9SSMcskvy?{b<0&4iwV{!FMjq&p zkOPU<)RbYIHc^R$zyZM%4;(+(46U99nD*QT0=_b<4vwGx7TO7TVYi_lyxjUq5>it} zNFru;SW9qYqkNDRD5Z&%GS_55!-12~(9IqQq=32R=wAKuzccji?7(8Bgx|^2j8&MFe4bB$WHX3=RmS^}}#Z;@( z5w+fjfa>)Cr$fYqfD~UwzSWL76K`Ps|7V^H5#Y&BOk6kT^R+GKC#L@aDjA8> TMUNq`00000NkvXXu0mjf8ME9( literal 0 HcmV?d00001 diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 1778603f..0ec2c7cd 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -246,6 +246,7 @@ const Map localizedValues = { "companyName": {"en": "Company Name:", "ar": "اسم الشركة: "}, "receiptOn": {"en": "Receipt on:", "ar": "تاريخ الفاتورة: "}, "expiryDate": {"en": "Expiry Date:", "ar": "تاريخ الانتهاء: "}, + "expiryPoints": {"en": "Expired", "ar": " منتهية الصلاحية"}, "expiryOn": {"en": "Expiry on:", "ar": "تاريخ الانتهاء: "}, "procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"}, "procedure": {"en": "Procedure", "ar": "اسم الاجراء:"}, diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart index 4e50cecc..20257b18 100644 --- a/lib/pages/pharmacies/screens/lakum-main-page.dart +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -63,7 +63,8 @@ class LakumMainPage extends StatelessWidget { SizedBox( height: mediaQuery.size.height * 0.02, ), - Container(width: mediaQuery.size.width * 1, child: LakumBannerWidget(model, mediaQuery, true)), + Container(width: mediaQuery.size.width * 1, + height: mediaQuery.size.width * .6, child: LakumBannerWidget(model, mediaQuery, true)), ], ) ], @@ -143,7 +144,7 @@ class LakumMainPage extends StatelessWidget { Padding( padding: EdgeInsets.symmetric(horizontal: 8), child: Texts( - TranslationBase.of(context).expiryDate, + TranslationBase.of(context).expiryPoints, // "Expired", fontSize: 14, ), @@ -151,7 +152,7 @@ class LakumMainPage extends StatelessWidget { ], ), Texts( - "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints}${TranslationBase.of(context).lakumPoint} ", + "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} ${TranslationBase.of(context).lakumPoint} ", fontWeight: FontWeight.bold, fontSize: 14, ), @@ -340,7 +341,8 @@ class LakumHomeButtons extends StatelessWidget { child: Row( children: [ Image.asset( - "assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png", + "assets/images/pharmacy_module/lakum/akum_transfer.png", + // "assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png", fit: BoxFit.fill, width: 35, height: 30, @@ -379,9 +381,10 @@ class LacumPointsWidget extends StatelessWidget { if (pointType == 1) { titleColor = Color(0xffefefef); } else if (pointType == 2) { - titleColor = Color(0xff004bcc); - } else if (pointType == 3) { + // titleColor = Color(0xff004bcc); titleColor = Color(0xff339933); + } else if (pointType == 3) { + titleColor = Colors.grey; } else { titleColor = Color(0xffffa500); } @@ -410,7 +413,7 @@ class LacumPointsWidget extends StatelessWidget { color: Color(0xffe1e1e1), width: 0.4, )), - color: pointType == 1 ? Color(0xff004bcc) : Color(0xffefefef), + color: pointType == 1 ? Color(0xff339933) : Color(0xffefefef), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/pages/pharmacies/screens/product-details/availability_info.dart b/lib/pages/pharmacies/screens/product-details/availability_info.dart index 2c10c8bf..a5ba0956 100644 --- a/lib/pages/pharmacies/screens/product-details/availability_info.dart +++ b/lib/pages/pharmacies/screens/product-details/availability_info.dart @@ -19,61 +19,64 @@ class AvailabilityInfo extends StatelessWidget { TranslationBase.of(context).noLocationAvailable, ), ) - : ListView.builder( - physics: ScrollPhysics(), - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: previousModel.productLocationService.length, - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - flex: 1, - child: Image.network(previousModel.productLocationService[index].projectImageUrl), - ), - SizedBox( - width: 10, - ), - Expanded( - flex: 4, - child: Text( - previousModel.productLocationService[index].locationDescription + "\n" + previousModel.productLocationService[index].cityName.toString(), - style: TextStyle(fontSize: 12), + : Container( + margin: EdgeInsets.only(bottom: 40), + child: ListView.builder( + physics: ScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: previousModel.productLocationService.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.all(8), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + flex: 1, + child: Image.network(previousModel.productLocationService[index].projectImageUrl), ), - ), - Expanded( - flex: 1, - child: IconButton( - icon: Icon(Icons.location_on), - color: Colors.red, - onPressed: () { - MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].latitude), previousModel.productLocationService[index].locationDescription); - }, + SizedBox( + width: 10, ), - ), - Expanded( - flex: 1, - child: IconButton( - icon: Icon(Icons.phone), - color: Colors.red, - onPressed: () { - launch("tel://" + previousModel.productLocationService[index].phoneNumber); - }, + Expanded( + flex: 4, + child: Text( + previousModel.productLocationService[index].locationDescription + "\n" + previousModel.productLocationService[index].cityName.toString(), + style: TextStyle(fontSize: 12), + ), ), - ), - ], - ), - Divider(height: 1.2, color: Colors.grey) - ], - ), - ); - }, - ); + Expanded( + flex: 1, + child: IconButton( + icon: Icon(Icons.location_on), + color: Colors.red, + onPressed: () { + MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription); + }, + ), + ), + Expanded( + flex: 1, + child: IconButton( + icon: Icon(Icons.phone), + color: Colors.red, + onPressed: () { + launch("tel://" + previousModel.productLocationService[index].phoneNumber); + }, + ), + ), + ], + ), + Divider(height: 1.2, color: Colors.grey) + ], + ), + ); + }, + ), + ); } convertCityName(txt) { diff --git a/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart b/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart index 2d9a3489..3520b305 100644 --- a/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart +++ b/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart @@ -133,7 +133,7 @@ class _FooterWidgetState extends State { height: 20, ), Container( - height: 58, + height: 55, child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart b/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart index 0f25b236..f71c92a4 100644 --- a/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart +++ b/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart' import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -57,22 +58,32 @@ class _ProductNameAndPriceState extends State { // SizedBox(width: 20), if (widget.authenticatedUserObject.isLogin) !widget.isStockAvailable && widget.customerId != null - ? InkWell( - onTap: () => widget.notifyMeWhenAvailable(context, widget.item.id), - child: Row(children: [ - Texts( + ?BorderedButton( TranslationBase.of(context).notifyMe, - decoration: TextDecoration.underline, - color: Colors.blue, - ), - SizedBox(width: 4), - Icon( - FontAwesomeIcons.bell, - color: Colors.blue, - size: 15.0, - ) - ]), - ) + hasBorder: true, + borderColor: Colors.green, + textColor: Colors.green, + fontWeight: FontWeight.bold, + vPadding: 6, + hPadding: 14, + handler: () => widget.notifyMeWhenAvailable(context, widget.item.id), + ) +// InkWell( +// onTap: () => widget.notifyMeWhenAvailable(context, widget.item.id), +// child: Row(children: [ +// Texts( +// TranslationBase.of(context).notifyMe, +// decoration: TextDecoration.underline, +// color: Colors.blue, +// ), +// SizedBox(width: 4), +// Icon( +// FontAwesomeIcons.bell, +// color: Colors.blue, +// size: 15.0, +// ) +// ]), +// ) : IconWithBg( icon: !widget.isInWishList ? Icons.favorite_border : Icons.favorite, color: !widget.isInWishList ? Colors.white : Colors.red[800], diff --git a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart index 60ca4693..d4b4bab7 100644 --- a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart +++ b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart @@ -59,7 +59,7 @@ class _LakumBannerWidgetState extends State { height: widget.mediaQuery.size.width * 1.0, ), Container( - margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + margin: EdgeInsets.fromLTRB(12, 75, 12, 0), child: Column( children: [ Row( @@ -70,13 +70,13 @@ class _LakumBannerWidgetState extends State { children: [ Texts( widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.memberName, - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( "${widget.model.lacumInformation.yahalaAccountNo}", - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -117,7 +117,7 @@ class _LakumBannerWidgetState extends State { ], ), SizedBox( - height: 10, + height: 5, ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -127,14 +127,14 @@ class _LakumBannerWidgetState extends State { children: [ Texts(TranslationBase.of(context).identificationNumber, // "IDENTIFICATION #", - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( widget.model.lacumInformation .identificationNo, - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -145,13 +145,13 @@ class _LakumBannerWidgetState extends State { children: [ Texts(TranslationBase.of(context).MEMBERSINCE, // "MEMBER SINCE", - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( widget.model.formatCreatedDateToString(), - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -160,7 +160,7 @@ class _LakumBannerWidgetState extends State { ], ), SizedBox( - height: 10, + height: 5, ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -170,13 +170,13 @@ class _LakumBannerWidgetState extends State { children: [ Texts(TranslationBase.of(context).lakumMobile, // "MOBILE #", - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.mobileNumber, - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -187,16 +187,16 @@ class _LakumBannerWidgetState extends State { children: [ Texts( TranslationBase.of(context).language, - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( widget.model.lacumInformation.prefLang == - "1" + "2" ? TranslationBase.of(context).lanEnglish : TranslationBase.of(context).lanArabic, - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -231,7 +231,7 @@ class _LakumBannerWidgetState extends State { ), Center( child: Container( - margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + margin: EdgeInsets.fromLTRB(20, 70, 20, 4), child: widget.model.convertBase64ToBarCodeImage() != null ? Image.memory( diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 0ce07ec4..98f43101 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -531,6 +531,8 @@ class TranslationBase { String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; + String get expiryPoints => localizedValues['expiryPoints'][locale.languageCode]; + String get procedureName => localizedValues['procedureName'][locale.languageCode]; String get procedure => localizedValues['procedure'][locale.languageCode]; From e9a86b4e1c845de3e027b11dad162589b53ca17d Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Sat, 20 Nov 2021 12:38:31 +0300 Subject: [PATCH 2/7] fix lakum --- lib/pages/pharmacies/screens/lakum-main-page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart index 874f43e5..20b65c55 100644 --- a/lib/pages/pharmacies/screens/lakum-main-page.dart +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -85,7 +85,7 @@ class LakumMainPage extends StatelessWidget { height: 12, ), Container( - height: 100, + height: 110, margin: EdgeInsets.symmetric( horizontal: 16, vertical: 12.0), child: ListView( From 7b44f3487f6d020eae02f7c8034e6f53bd7f9188 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Sat, 20 Nov 2021 17:16:52 +0300 Subject: [PATCH 3/7] fix lakum design --- lib/pages/pharmacies/widgets/lacum-banner-widget.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart index d4b4bab7..29111570 100644 --- a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart +++ b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart @@ -231,11 +231,15 @@ class _LakumBannerWidgetState extends State { ), Center( child: Container( - margin: EdgeInsets.fromLTRB(20, 70, 20, 4), + margin: EdgeInsets.fromLTRB(5, 70, 5, 4), child: widget.model.convertBase64ToBarCodeImage() != null ? Image.memory( - widget.model.convertBase64ToBarCodeImage()) + widget.model.convertBase64ToBarCodeImage(), + fit: BoxFit.fill, + height: 100.0, + width: 180.0 + ) : Container(), ), ), From 5ae7471d3ea9313134a2faf61725aefb0c43ded3 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Sun, 21 Nov 2021 09:03:01 +0300 Subject: [PATCH 4/7] fix issue --- .../product-details/product-detail.dart | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/pages/pharmacies/screens/product-details/product-detail.dart b/lib/pages/pharmacies/screens/product-details/product-detail.dart index c414e61e..9eeef868 100644 --- a/lib/pages/pharmacies/screens/product-details/product-detail.dart +++ b/lib/pages/pharmacies/screens/product-details/product-detail.dart @@ -290,18 +290,19 @@ class __ProductDetailPageState extends State { product: widget.product, previousModel: model, ) - : isAvailability && widget.product.stockAvailability != "Out of stock" + : isAvailability + //&& widget.product.stockAvailability != "Out of stock" ? AvailabilityInfo(previousModel: model) - : isAvailability && widget.product.stockAvailability == "Out of stock" - ? Container( - // padding: EdgeInsets.all(15), - padding: EdgeInsets.fromLTRB(15, 15, 15, 20), - margin: EdgeInsets.only(bottom: 20), - alignment: Alignment.center, - child: Text( - TranslationBase.of(context).noLocationAvailable, - ), - ) +// : isAvailability && widget.product.stockAvailability == "Out of stock" +// ? Container( +// // padding: EdgeInsets.all(15), +// padding: EdgeInsets.fromLTRB(15, 15, 15, 20), +// margin: EdgeInsets.only(bottom: 20), +// alignment: Alignment.center, +// child: Text( +// TranslationBase.of(context).noLocationAvailable, +// ), +// ) : Container(), ], ), From c60cf72640e4c8f105ed81058cdbc1860d587da1 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Sun, 21 Nov 2021 09:16:52 +0300 Subject: [PATCH 5/7] fix lakum design --- lib/pages/pharmacies/screens/lacum-transfer-page.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/pharmacies/screens/lacum-transfer-page.dart b/lib/pages/pharmacies/screens/lacum-transfer-page.dart index f05c6da4..b3995aca 100644 --- a/lib/pages/pharmacies/screens/lacum-transfer-page.dart +++ b/lib/pages/pharmacies/screens/lacum-transfer-page.dart @@ -71,7 +71,8 @@ class _LacumTransferPageState extends State { color: Color(0xffe1e1e1), width: 0.4, )), - color: Color(0xff6294ed), + color: Colors.green + //(0xff6294ed), ), child: Row( crossAxisAlignment: From bd93395d0f03e01552cd0ca70b178ead902b46a0 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Sun, 21 Nov 2021 09:26:38 +0300 Subject: [PATCH 6/7] fix order details issue --- lib/pages/pharmacy/order/OrderDetails.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pages/pharmacy/order/OrderDetails.dart b/lib/pages/pharmacy/order/OrderDetails.dart index 035c516c..fb580e4f 100644 --- a/lib/pages/pharmacy/order/OrderDetails.dart +++ b/lib/pages/pharmacy/order/OrderDetails.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -16,6 +17,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter/src/widgets/image.dart' as flutterImage; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; dynamic languageID; @@ -67,6 +69,7 @@ class _OrderDetailsPageState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); this.context = context; return BaseView( onModelReady: (model) { @@ -132,7 +135,7 @@ class _OrderDetailsPageState extends State { ), ) : Text( - languageID == "ar" ? model.orderListModel[0].orderStatusn.toString() : model.orderListModel[0].orderStatus.toString(), + projectProvider.isArabic ? model.orderListModel[0].orderStatusn.toString() : model.orderListModel[0].orderStatus.toString(), style: TextStyle( color: Colors.white, fontSize: 13.0, From 2992ca4f7063ab4fb8d222c858b55bc4b52eeff2 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Sun, 21 Nov 2021 09:49:40 +0300 Subject: [PATCH 7/7] fix translation --- lib/pages/pharmacy/order/OrderDetails.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pages/pharmacy/order/OrderDetails.dart b/lib/pages/pharmacy/order/OrderDetails.dart index fb580e4f..291a3413 100644 --- a/lib/pages/pharmacy/order/OrderDetails.dart +++ b/lib/pages/pharmacy/order/OrderDetails.dart @@ -70,6 +70,7 @@ class _OrderDetailsPageState extends State { @override Widget build(BuildContext context) { ProjectViewModel projectProvider = Provider.of(context); + ProjectViewModel projectViewModel = Provider.of(context); this.context = context; return BaseView( onModelReady: (model) { @@ -340,7 +341,9 @@ class _OrderDetailsPageState extends State { itemBuilder: (context, index) { return Container( child: productTile( - productName: model.orderListModel[0].orderItems[index].product.name.toString(), + productName: projectViewModel.isArabic ? + model.orderListModel[0].orderItems[index].product.namen.toString() + :model.orderListModel[0].orderItems[index].product.name.toString(), productPrice: model.orderListModel[0].orderItems[index].product.price.toString(), productRate: model.orderListModel[0].orderItems[index].product.approvedRatingSum.toDouble(), productReviews: model.orderListModel[0].orderItems[index].product.approvedTotalReviews,