Merge branch 'fatima-new' into 'development'

Fatima new

See merge request Cloud_Solution/diplomatic-quarter!451
merge-update-with-lab-changes
haroon amjad 4 years ago
commit a40cd6ccd2

@ -20,7 +20,7 @@ class PharmacyProduct {
bool allowCustomerReviews; bool allowCustomerReviews;
int approvedRatingSum; int approvedRatingSum;
int notApprovedRatingSum; int notApprovedRatingSum;
int approvedTotalReviews; dynamic approvedTotalReviews;
int notApprovedTotalReviews; int notApprovedTotalReviews;
dynamic sku; dynamic sku;
bool isRx; bool isRx;

@ -24,7 +24,7 @@ class OrdersModel {
class Orders { class Orders {
String id; String id;
int productCount; int productCount;
double orderTotal; dynamic orderTotal;
String createdOnUtc; String createdOnUtc;
int orderStatusId; int orderStatusId;
String orderStatus; String orderStatus;
@ -32,9 +32,9 @@ class Orders {
bool canCancel; bool canCancel;
bool canRefund; bool canRefund;
dynamic customerId; dynamic customerId;
double orderSubtotalExclTax; dynamic orderSubtotalExclTax;
dynamic orderShippingExclTax; dynamic orderShippingExclTax;
double orderTax; dynamic orderTax;
Orders( Orders(
@ -64,9 +64,9 @@ class Orders {
canCancel = json['can_cancel']; canCancel = json['can_cancel'];
canRefund = json['can_refund']; canRefund = json['can_refund'];
customerId = json['customer_id']; customerId = json['customer_id'];
orderSubtotalExclTax= json["order_subtotal_excl_tax"].toDouble(); orderSubtotalExclTax= json["order_subtotal_excl_tax"];
orderShippingExclTax= json["order_shipping_excl_tax"]; orderShippingExclTax= json["order_shipping_excl_tax"];
orderTax= json["order_tax"].toDouble(); orderTax= json["order_tax"];
}catch(e){ }catch(e){
print(e); print(e);
} }

@ -621,19 +621,18 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
size: 18, size: 18,
color: Colors.blue,), color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.finalProducts[index].rxMessage == null){ if(model.finalProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.finalProducts[index].id); await addToCartFunction(1, model.finalProducts[index].id);
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
FadePage(page: CartOrderPage()), FadePage(page: CartOrderPage()));
);
} }
else{ else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
} }
GifLoaderDialogUtils.hideDialog(context); //
} }
), ),

@ -1175,18 +1175,18 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
size: 18, size: 18,
color: Colors.blue,), color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.parentProducts[index].rxMessage == null){ if(model.parentProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.parentProducts[index].id); await addToCartFunction(1, model.parentProducts[index].id);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
FadePage(page: CartOrderPage()), FadePage(page: CartOrderPage()));
);
} }
else{ else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
} }
GifLoaderDialogUtils.hideDialog(context);
} }
), ),

@ -32,6 +32,7 @@ class _ProductCheckTypeWidgetState extends State<ProductCheckTypeWidget> {
: widget.model.wishListList[index].product.name, : widget.model.wishListList[index].product.name,
productPrice: widget.model.wishListList[index].subtotal, productPrice: widget.model.wishListList[index].subtotal,
productRate: double.parse(widget.model.wishListList[index].subtotalVatRate), productRate: double.parse(widget.model.wishListList[index].subtotalVatRate),
approvedTotalReviews:widget.model.wishListList[index].product.approvedTotalReviews,
productImage: widget.model.wishListList[index].product.images[0].src, productImage: widget.model.wishListList[index].product.images[0].src,
productID: widget.model.wishListList[index].product.id, productID: widget.model.wishListList[index].product.id,
onDelete: deleteWishListItem, onDelete: deleteWishListItem,

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class ProductOrderItem extends StatefulWidget { class ProductOrderItem extends StatefulWidget {
@ -39,7 +40,7 @@ class _ProductOrderItemState extends State<ProductOrderItem> {
leading: InkWell( leading: InkWell(
onTap: () => {widget.deleteCartItems()}, onTap: () => {widget.deleteCartItems()},
child: Icon( child: Icon(
Icons.delete_outline_sharp, FontAwesomeIcons.trashAlt,size: 15,
color: Colors.grey.shade700, color: Colors.grey.shade700,
), ),
), ),

@ -70,6 +70,7 @@ class _OrderPageState extends State<OrderPage>
TabBar( TabBar(
labelPadding: EdgeInsets.only(left: 3.0, right: 3.0), labelPadding: EdgeInsets.only(left: 3.0, right: 3.0),
labelColor: Colors.black, labelColor: Colors.black,
indicatorColor: Colors.green,
tabs: [ tabs: [
Tab(text: TranslationBase.of(context).delivered), Tab(text: TranslationBase.of(context).delivered),
Tab(text: TranslationBase.of(context).processing), Tab(text: TranslationBase.of(context).processing),
@ -127,86 +128,86 @@ class _OrderPageState extends State<OrderPage>
return Container( return Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( InkWell(
mainAxisAlignment: onTap: () {
MainAxisAlignment.spaceBetween, Navigator.push(
children: <Widget>[ context,
Container( FadePage(
margin: EdgeInsets.all(8.0), page: OrderDetailsPage(
child: Column( orderModel:
crossAxisAlignment: deliveredOrderList[
CrossAxisAlignment.start, index]),
children: <Widget>[ ));
Row( },
children: [ child: Row(
Container( mainAxisAlignment:
margin: EdgeInsets.only(right: 5), MainAxisAlignment.spaceBetween,
child: Text( children: <Widget>[
TranslationBase.of(context) Container(
.orderNumber, margin: EdgeInsets.all(8.0),
style: TextStyle( child: Column(
fontSize: 16.0, crossAxisAlignment:
fontWeight: FontWeight.bold, CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
), ),
), ),
), Container(
Container( child: Text(
child: Text( deliveredOrderList[index]
deliveredOrderList[index] .id
.id .toString(),
.toString(), style: TextStyle(
style: TextStyle( fontSize: 16.0,
fontSize: 16.0, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), ),
), ),
), ],
], ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Row(
Row( children: [
children: [ Container(
Container( margin: EdgeInsets.only(right: 5),
margin: EdgeInsets.only(right: 5), child: Text(
child: Text( TranslationBase.of(context)
TranslationBase.of(context) .orderDate,
.orderDate, style: TextStyle(
style: TextStyle( fontSize: 14.0,
fontSize: 14.0, ),
), ),
), ),
), Container(
Container( child: Text(
child: Text( deliveredOrderList[index]
deliveredOrderList[index] .createdOnUtc
.createdOnUtc .toString()
.toString() .substring(0, 10),
.substring(0, 10), style: TextStyle(
style: TextStyle( fontSize: 14.0,
fontSize: 14.0, ),
), ),
), ),
), ],
], ),
), ],
], ),
), ),
), Container(
Container( margin: EdgeInsets.all(8.0),
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
deliveredOrderList[
index]),
));
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -215,8 +216,8 @@ class _OrderPageState extends State<OrderPage>
width: 20, width: 20,
), ),
), ),
), ],
], ),
), ),
Divider( Divider(
color: Colors.grey[350], color: Colors.grey[350],
@ -394,85 +395,85 @@ class _OrderPageState extends State<OrderPage>
return Container( return Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( InkWell(
mainAxisAlignment: onTap: () {
MainAxisAlignment.spaceBetween, Navigator.push(
children: <Widget>[ context,
Container( FadePage(
margin: EdgeInsets.all(8.0), page: OrderDetailsPage(
child: Column( orderModel:
crossAxisAlignment: processingOrderList[
CrossAxisAlignment.start, index])));
children: <Widget>[ },
Row( child: Row(
children: [ mainAxisAlignment:
Container( MainAxisAlignment.spaceBetween,
margin: EdgeInsets.only(right: 5), children: <Widget>[
child: Text( Container(
TranslationBase.of(context) margin: EdgeInsets.all(8.0),
.orderNumber, child: Column(
style: TextStyle( crossAxisAlignment:
fontSize: 16.0, CrossAxisAlignment.start,
fontWeight: FontWeight.bold, children: <Widget>[
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
), ),
), ),
), Container(
Container( child: Text(
child: Text( processingOrderList[index]
processingOrderList[index] .id
.id .toString(),
.toString(), style: TextStyle(
style: TextStyle( fontSize: 16.0,
fontSize: 16.0, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), ),
), ),
), ],
], ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Row(
Row( children: [
children: [ Container(
Container( margin: EdgeInsets.only(right: 5),
margin: EdgeInsets.only(right: 5), child: Text(
child: Text( TranslationBase.of(context)
TranslationBase.of(context) .orderDate,
.orderDate, style: TextStyle(
style: TextStyle( fontSize: 14.0,
fontSize: 14.0, ),
), ),
), ),
), Container(
Container( child: Text(
child: Text( processingOrderList[index]
processingOrderList[index] .createdOnUtc
.createdOnUtc .toString()
.toString() .substring(0, 10),
.substring(0, 10), style: TextStyle(
style: TextStyle( fontSize: 14.0,
fontSize: 14.0, ),
), ),
), ),
), ],
], ),
), ],
], ),
), ),
), Container(
Container( margin: EdgeInsets.all(8.0),
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
processingOrderList[
index])));
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -481,8 +482,8 @@ class _OrderPageState extends State<OrderPage>
width: 20, width: 20,
), ),
), ),
), ],
], ),
), ),
Divider( Divider(
color: Colors.grey[350], color: Colors.grey[350],
@ -837,87 +838,87 @@ class _OrderPageState extends State<OrderPage>
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( InkWell(
mainAxisAlignment: onTap: () {
MainAxisAlignment.spaceBetween, Navigator.push(
children: <Widget>[ context,
Container( FadePage(
margin: EdgeInsets.all(8.0), page: OrderDetailsPage(
child: Column( orderModel:
crossAxisAlignment: pendingOrderList[
CrossAxisAlignment.start, index])));
children: <Widget>[ },
Row( child: Row(
children: [ mainAxisAlignment:
Container( MainAxisAlignment.spaceBetween,
margin: children: <Widget>[
EdgeInsets.only(right: 5), Container(
child: Text( margin: EdgeInsets.all(8.0),
TranslationBase.of(context) child: Column(
.orderNumber, crossAxisAlignment:
style: TextStyle( CrossAxisAlignment.start,
fontSize: 16.0, children: <Widget>[
fontWeight: FontWeight.bold, Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
), ),
), ),
), Container(
Container( child: Text(
child: Text( pendingOrderList[index]
pendingOrderList[index] .id
.id .toString(),
.toString(), style: TextStyle(
style: TextStyle( fontSize: 16.0,
fontSize: 16.0, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), ),
), ),
), ],
], ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Row(
Row( children: [
children: [ Container(
Container( margin:
margin: EdgeInsets.only(right: 5),
EdgeInsets.only(right: 5), child: Text(
child: Text( TranslationBase.of(context)
TranslationBase.of(context) .orderDate,
.orderDate, style: TextStyle(
style: TextStyle( fontSize: 14.0,
fontSize: 14.0, ),
), ),
), ),
), Container(
Container( child: Text(
child: Text( pendingOrderList[index]
pendingOrderList[index] .createdOnUtc
.createdOnUtc .toString()
.toString() .substring(0, 10),
.substring(0, 10), style: TextStyle(
style: TextStyle( fontSize: 14.0,
fontSize: 14.0, ),
), ),
), ),
), ],
], ),
), ],
], ),
), ),
), Container(
Container( margin: EdgeInsets.all(8.0),
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
pendingOrderList[
index])));
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -926,8 +927,8 @@ class _OrderPageState extends State<OrderPage>
width: 20, width: 20,
), ),
), ),
), ],
], ),
), ),
Divider( Divider(
color: Colors.grey[350], color: Colors.grey[350],
@ -1106,87 +1107,87 @@ class _OrderPageState extends State<OrderPage>
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( InkWell(
mainAxisAlignment: onTap: () {
MainAxisAlignment.spaceBetween, Navigator.push(
children: <Widget>[ context,
Container( FadePage(
margin: EdgeInsets.all(8.0), page: OrderDetailsPage(
child: Column( orderModel:
crossAxisAlignment: cancelledOrderList[
CrossAxisAlignment.start, index])));
children: <Widget>[ },
Row( child: Row(
children: [ mainAxisAlignment:
Container( MainAxisAlignment.spaceBetween,
margin: children: <Widget>[
EdgeInsets.only(right: 5), Container(
child: Text( margin: EdgeInsets.all(8.0),
TranslationBase.of(context) child: Column(
.orderNumber, crossAxisAlignment:
style: TextStyle( CrossAxisAlignment.start,
fontSize: 16.0, children: <Widget>[
fontWeight: FontWeight.bold, Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
), ),
), ),
), Container(
Container( child: Text(
child: Text( cancelledOrderList[index]
cancelledOrderList[index] .id
.id .toString(),
.toString(), style: TextStyle(
style: TextStyle( fontSize: 16.0,
fontSize: 16.0, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), ),
), ),
), ],
], ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Row(
Row( children: [
children: [ Container(
Container( margin:
margin: EdgeInsets.only(right: 5),
EdgeInsets.only(right: 5), child: Text(
child: Text( TranslationBase.of(context)
TranslationBase.of(context) .orderDate,
.orderDate, style: TextStyle(
style: TextStyle( fontSize: 14.0,
fontSize: 14.0, ),
), ),
), ),
), Container(
Container( child: Text(
child: Text( cancelledOrderList[index]
cancelledOrderList[index] .createdOnUtc
.createdOnUtc .toString()
.toString() .substring(0, 10),
.substring(0, 10), style: TextStyle(
style: TextStyle( fontSize: 14.0,
fontSize: 14.0, ),
), ),
), ),
), ],
], ),
), ],
], ),
), ),
), Container(
Container( margin: EdgeInsets.all(8.0),
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
cancelledOrderList[
index])));
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -1195,8 +1196,8 @@ class _OrderPageState extends State<OrderPage>
width: 20, width: 20,
), ),
), ),
), ],
], ),
), ),
Divider( Divider(
color: Colors.grey[350], color: Colors.grey[350],

@ -321,8 +321,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
margin: EdgeInsets.only(bottom: 10.0, top: 10.0), margin: EdgeInsets.only(bottom: 10.0, top: 10.0),
child: Text( child: Text(
model.orderListModel[0].paymentName model.orderListModel[0].paymentName
.toString() .toString(),
.substring(12),
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

@ -1072,18 +1072,17 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
size: 18, size: 18,
color: Colors.blue,), color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.subProducts[index].rxMessage == null){ if(model.subProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.subProducts[index].id); await addToCartFunction(1, model.subProducts[index].id);
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
FadePage(page: CartOrderPage()), FadePage(page: CartOrderPage()));}
);}
else{ else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
} }
GifLoaderDialogUtils.hideDialog(context);
} }
), ),

@ -45,9 +45,9 @@ class BottomNavHomeItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
SizedBox( // SizedBox(
height: 15, // height: 15,
), // ),
currentIndex == index currentIndex == index
? Divider( ? Divider(
// color: Color(0xff5AB145), // color: Color(0xff5AB145),
@ -57,19 +57,24 @@ class BottomNavHomeItem extends StatelessWidget {
thickness: 0, thickness: 0,
), ),
Container( Container(
margin: EdgeInsets.only(bottom: 5.0),
child: Image.asset( child: Image.asset(
'assets/images/habib-logo.png', 'assets/images/habib-logo.png',
), ),
height: 22.0, height: 22.0,
), ),
SizedBox( SizedBox(
height: 9, height: 5,
), ),
Texts( Container(
title, margin: EdgeInsets.only(bottom: 7.0),
textAlign: TextAlign.start, child: Texts(
color: currentIndex == index ? Colors.grey : Colors.grey, title,
fontSize: 11, textAlign: TextAlign.start,
color: currentIndex == index ? Colors.grey : Colors.grey,
fontSize: 11,
),
), ),
// Added TextAlign Property // Added TextAlign Property
], ],

@ -39,7 +39,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
return Expanded( return Expanded(
child: SizedBox( child: SizedBox(
// height: 72.0, height: 66.0,
child: Stack( child: Stack(
clipBehavior: Clip.none, clipBehavior: Clip.none,
children: [ children: [
@ -63,17 +63,18 @@ class BottomNavPharmacyItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
SizedBox( // SizedBox(
height: 15, // height: 15,
), // ),
currentIndex == index currentIndex == index
? Divider( ? Divider(
color: Color(0xff5AB145), color: Color(0xff5AB133),
thickness: 3.5, thickness: 3.5,
) )
: Divider( : Divider(
thickness: 0, thickness: 0,
), ),
Container( Container(
child: Icon(currentIndex == index ? activeIcon : icon, child: Icon(currentIndex == index ? activeIcon : icon,
color: isHome color: isHome
@ -81,7 +82,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
: currentIndex == index : currentIndex == index
? Colors.grey ? Colors.grey
: Colors.grey, : Colors.grey,
size: 22.0), size: 20.0),
), ),
SizedBox( SizedBox(
height: 11, height: 11,
@ -93,7 +94,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: currentIndex == index ? Colors.grey : Colors.grey, color: currentIndex == index ? Colors.grey : Colors.grey,
fontWeight: currentIndex == index fontWeight: currentIndex == index
? FontWeight.bold ? FontWeight.normal
: FontWeight.w400, : FontWeight.w400,
fontSize: currentIndex == index ? 13 : 11, fontSize: currentIndex == index ? 13 : 11,
), ),
@ -108,13 +109,13 @@ class BottomNavPharmacyItem extends StatelessWidget {
0) 0)
Positioned( Positioned(
top: 11.5, top: 11.5,
right: -4.5, right: -3.5,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.red, color: Colors.red,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
), ),
padding: EdgeInsets.only(left: 7, right: 6.5), padding: EdgeInsets.only(left: 6.5, right: 6.5),
height: 18, height: 18,
child: Center( child: Center(
child: Texts( child: Texts(

@ -25,6 +25,7 @@ class productTile extends StatelessWidget {
final PharmacyProduct product; final PharmacyProduct product;
final dynamic productID; final dynamic productID;
final Function onDelete; final Function onDelete;
final dynamic approvedTotalReviews;
// final VoidCallback deleteWishlistItems; // final VoidCallback deleteWishlistItems;
productTile( productTile(
@ -43,6 +44,8 @@ class productTile extends StatelessWidget {
this.product, this.product,
this.productID, this.productID,
this.onDelete, this.onDelete,
this.approvedTotalReviews,
}); });
@override @override
@ -112,22 +115,33 @@ class productTile extends StatelessWidget {
), ),
), ),
this.isOrderDetails == false this.isOrderDetails == false
? Container( ? Row(
margin: EdgeInsets.all(5), crossAxisAlignment: CrossAxisAlignment.start,
child: Align( children: [
alignment: Alignment.topLeft, Container(
child: RatingBar.readOnly( margin: EdgeInsets.all(5),
initialRating: productRate, child: Align(
size: 15.0, alignment: Alignment.topLeft,
filledColor: Colors.yellow[700], child: RatingBar.readOnly(
emptyColor: Colors.grey[500], initialRating: productRate,
isHalfAllowed: true, size: 15.0,
halfFilledIcon: Icons.star_half, filledColor: Colors.yellow[700],
filledIcon: Icons.star, emptyColor: Colors.grey[500],
emptyIcon: Icons.star, isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
), ),
Text( '$approvedTotalReviews',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.grey,
fontSize: 13),
), ),
) ],
)
: Container(), : Container(),
], ],
), ),
@ -150,7 +164,9 @@ class productTile extends StatelessWidget {
height: 50, height: 50,
), ),
IconButton( IconButton(
icon: Icon(FontAwesomeIcons.shoppingCart, size: 15), icon: Icon(Icons.shopping_cart,
size: 18,
color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, productID); await addToCartFunction(1, productID);

Loading…
Cancel
Save