fixed issues

merge-update-with-lab-changes
Fatimah Alshammari 4 years ago
parent f649701276
commit e494c9304d

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save