diff --git a/assets/images/pharmacy/Logo Parmacy-green.png b/assets/images/pharmacy/Logo Parmacy-green.png new file mode 100644 index 00000000..72862b33 Binary files /dev/null and b/assets/images/pharmacy/Logo Parmacy-green.png differ diff --git a/assets/images/pharmacy/hmg_shipping_greenlogo.svg b/assets/images/pharmacy/hmg_shipping_greenlogo.svg new file mode 100644 index 00000000..449712a5 --- /dev/null +++ b/assets/images/pharmacy/hmg_shipping_greenlogo.svg @@ -0,0 +1,25 @@ + + + diff --git a/assets/images/pharmacy_module/payment/LogoParmacyGreen.png b/assets/images/pharmacy_module/payment/LogoParmacyGreen.png new file mode 100644 index 00000000..72862b33 Binary files /dev/null and b/assets/images/pharmacy_module/payment/LogoParmacyGreen.png differ diff --git a/lib/pages/pharmacy/order/OrderDetails.dart b/lib/pages/pharmacy/order/OrderDetails.dart index 9119a21f..1e4c5bb3 100644 --- a/lib/pages/pharmacy/order/OrderDetails.dart +++ b/lib/pages/pharmacy/order/OrderDetails.dart @@ -22,9 +22,6 @@ import 'package:provider/provider.dart'; dynamic languageID; class OrderDetailsPage extends StatefulWidget { - var languageID; - - OrderModel orderModel; OrderDetailsPage({@required this.orderModel}); @@ -57,8 +54,6 @@ class _OrderDetailsPageState extends State { getLanguageID(); super.initState(); print(widget.orderModel.orderItems.length); - getLanguageID(); - print(widget.orderModel.orderItems.length); getCancelOrder(widget.orderModel.id); // cancelOrderDetail(order) } @@ -110,9 +105,8 @@ class _OrderDetailsPageState extends State { color: getStatusBackgroundColor(), borderRadius: BorderRadius.circular(30.0)), child: Text( -// widget.orderModel.orderStatus.toString().substring(12), -// languageID == "ar" -// ? widget.orderModel.orderStatusn.toString(): + languageID == "ar" + ? widget.orderModel.orderStatusn.toString(): widget.orderModel.orderStatus.toString().substring(12) , // TranslationBase.of(context).delivered, style: TextStyle( @@ -134,7 +128,7 @@ class _OrderDetailsPageState extends State { .toString() .substring(10) + ' ' + - model.order[0].shippingAddress.lastName + widget.orderModel.shippingAddress.lastName .toString() .substring(9), style: TextStyle( @@ -145,16 +139,20 @@ class _OrderDetailsPageState extends State { ]), ), Container( - margin: EdgeInsets.fromLTRB(11.0, 5.0, 1.0, 5.0), - child: Text( - widget.orderModel.shippingAddress.address1 - .toString() - .substring(9), - style: TextStyle( - fontSize: 10.0, - fontWeight: FontWeight.bold, - color: Colors.grey, - ), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 1.0, 5.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.orderModel.shippingAddress.address1 + .toString() + .substring(9), + style: TextStyle( + fontSize: 10.0, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), + ),] ), ), Container( @@ -232,35 +230,36 @@ class _OrderDetailsPageState extends State { ), Container( child: flutterImage.Image.asset( - widget.orderModel - .shippingRateComputationMethodSystemName == - "Shipping.FixedOrByWeight" - ? "assets/images/pharmacy_module/payment/hmg_shipping_logo.png" + widget.orderModel.shippingRateComputationMethodSystemName != + "Shipping.Aramex" + ? "assets/images/pharmacy_module/payment/LogoParmacyGreen.png" : "assets/images/pharmacy_module/payment/aramex_shipping_logo.png", fit: BoxFit.contain, +// height: 100, + width: 100, ), ), - Container( - child: widget.orderModel - .shippingRateComputationMethodSystemName == - "Shipping.FixedOrByWeight" - ? Container( - margin: EdgeInsets.only(bottom: 10.0, top: 10.0), - child: SvgPicture.asset( - 'assets/images/pharmacy_module/payment/hmg_shipping_logo.png', - height: 25, - width: 25, - ), - ) - : Container( - margin: EdgeInsets.only(bottom: 10.0, top: 10.0), - child: SvgPicture.asset( - 'assets/images/pharmacy_module/payment/aramex_shipping_logo.png', - height: 25, - width: 25, - ), - ), - ), +// Container( +// child: widget.orderModel +// .shippingRateComputationMethodSystemName == +// "Shipping.FixedOrByWeight" +// ? Container( +// margin: EdgeInsets.only(bottom: 10.0, top: 10.0), +// child: SvgPicture.asset( +// 'assets/images/pharmacy_module/payment/hmg_shipping_logo.png', +// height: 25, +// width: 25, +// ), +// ) +// : Container( +// margin: EdgeInsets.only(bottom: 10.0, top: 10.0), +// child: SvgPicture.asset( +// 'assets/images/pharmacy_module/payment/aramex_shipping_logo.png', +// height: 25, +// width: 25, +// ), +// ), +// ), ], ), Divider( @@ -459,7 +458,7 @@ class _OrderDetailsPageState extends State { ), ), Text( - model.order[0].orderTax.toString(), + widget.orderModel.orderTax.toString(), style: TextStyle( fontSize: 13.0, ),