From fb974af72681df64cc50f2f8c0a4117bb799028c Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Wed, 24 Nov 2021 16:29:46 +0300 Subject: [PATCH 1/2] fix issues --- .../screens/product-details/details_info.dart | 31 ++++++++++--------- .../product-details/product-detail.dart | 6 ++-- .../product-name-and-price.dart | 29 ++++++++--------- .../screens/product-details/reviews_info.dart | 8 ++--- 4 files changed, 38 insertions(+), 36 deletions(-) diff --git a/lib/pages/pharmacies/screens/product-details/details_info.dart b/lib/pages/pharmacies/screens/product-details/details_info.dart index bc5e7f80..e7a7f663 100644 --- a/lib/pages/pharmacies/screens/product-details/details_info.dart +++ b/lib/pages/pharmacies/screens/product-details/details_info.dart @@ -22,33 +22,34 @@ class DetailsInfo extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - child: Texts( - TranslationBase.of(context) - .description, - fontSize: 17, - color: Colors.grey, - ), - ), +// Container( +// child: Texts( +// TranslationBase.of(context) +// .description, +// fontSize: 17, +// color: Colors.grey, +// ), +// ), +// SizedBox( +// height: 10, +// ), +// Divider(height: 1, color: Colors.grey), SizedBox( height: 10, ), - Divider(height: 1, color: Colors.grey), - SizedBox( - height: 15, - ), Container( - child: Texts( + margin: EdgeInsets.only(left: 10, right: 10), + child: Text( projectViewModel.isArabic ? product.fullDescriptionn : product .fullDescription ?? "", - fontSize: 16, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.56), ), ), SizedBox( - height: 20, + height: 60, ), ]), ); diff --git a/lib/pages/pharmacies/screens/product-details/product-detail.dart b/lib/pages/pharmacies/screens/product-details/product-detail.dart index bde315a7..627ef5a7 100644 --- a/lib/pages/pharmacies/screens/product-details/product-detail.dart +++ b/lib/pages/pharmacies/screens/product-details/product-detail.dart @@ -205,7 +205,7 @@ class __ProductDetailPageState extends State { }, child: Text( TranslationBase.of(context).details, - style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14), + style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84), ), color: Colors.white, ), @@ -236,7 +236,7 @@ class __ProductDetailPageState extends State { }, child: Text( TranslationBase.of(context).reviews, - style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14), + style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84), ), color: Colors.white, ), @@ -266,7 +266,7 @@ class __ProductDetailPageState extends State { : null, child: Text( TranslationBase.of(context).availability, - style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14), + style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84), ), color: Colors.white, ), 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 d585b642..65a32fe4 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 @@ -70,7 +70,7 @@ class _ProductNameAndPriceState extends State { style: TextStyle(color: Colors.white, // regular: true, fontSize: 17, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w600, letterSpacing:-0.68 // textAlign: TextAlign.center, ) ), @@ -79,14 +79,14 @@ class _ProductNameAndPriceState extends State { ) : Container(), FractionallySizedBox( - widthFactor: 0.95, + widthFactor: 0.93, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ // Texts(widget.item.price.toString() + " " + TranslationBase.of(context).sar, fontWeight: FontWeight.bold, fontSize: 20), Container( margin: EdgeInsets.only(top: 10.0, right: 10.0), - padding: EdgeInsets.only(left: 11.0, right: 11.0, top: 0, bottom: 0), + padding: EdgeInsets.only(left: 11, right: 11,), decoration: BoxDecoration( border: Border.all( color: getStatusBackgroundColor(), @@ -97,7 +97,7 @@ class _ProductNameAndPriceState extends State { borderRadius: BorderRadius.circular(30.0)), child: Text( widget.stockAvailability, - style: TextStyle(fontWeight: FontWeight.w600, fontSize: 11, color: Color(0xffFFFFFF),), + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 11, color: Color(0xffFFFFFF),letterSpacing:-0.44), //color: widget.isStockAvailable ? Colors.white : Colors.red, ), ), @@ -177,14 +177,14 @@ class _ProductNameAndPriceState extends State { ), ), Padding( - padding: const EdgeInsets.only(left: 8,right: 8, top: 1, bottom: 15), + padding: const EdgeInsets.only(left: 8,right: 8, top: 1, bottom: 12), child: Container( - margin: EdgeInsets.only(left: 5, right: 5), + margin: EdgeInsets.only(left: 10, right: 10), child: Align( alignment: projectViewModel.isArabic ? Alignment.topRight : Alignment.topLeft, child: Text( projectViewModel.isArabic ? widget.item.namen : widget.item.name, - style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16), + style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16, letterSpacing:-0.96), ), ), ), @@ -193,12 +193,12 @@ class _ProductNameAndPriceState extends State { Padding( padding: const EdgeInsets.only(left: 8,right: 8), child: Container( - margin: EdgeInsets.only(left: 5, right: 5), + margin: EdgeInsets.only(left: 10, right: 10), child: Align( alignment: projectViewModel.isArabic ? Alignment.topRight : Alignment.topLeft, child: Text( TranslationBase.of(context).sar+ " " + widget.item.price.toString(), - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 19),), + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 19, letterSpacing:-0.76),), ), ), @@ -208,6 +208,7 @@ class _ProductNameAndPriceState extends State { child: Row( children: [ Container( + margin: EdgeInsets.only(left: 8, right: 8), child: Align( alignment: Alignment.bottomLeft, child: Row( @@ -223,16 +224,16 @@ class _ProductNameAndPriceState extends State { emptyIcon: Icons.star_border, ), SizedBox( - width: 10, + width: 5, ), // Texts( // "${widget.item.approvedRatingSum}", // fontWeight: FontWeight.bold, // fontSize: 12, // ), - SizedBox( - width: 30, - ), +// SizedBox( +// width: 30, +// ), Text( "(${widget.item.approvedTotalReviews}${TranslationBase.of(context).review})", style: TextStyle(fontWeight: FontWeight.w600, fontSize: 12), @@ -257,7 +258,7 @@ class _ProductNameAndPriceState extends State { ), ), SizedBox( - height: 30, + height: 20, ), ], ), diff --git a/lib/pages/pharmacies/screens/product-details/reviews_info.dart b/lib/pages/pharmacies/screens/product-details/reviews_info.dart index e3050927..c4526790 100644 --- a/lib/pages/pharmacies/screens/product-details/reviews_info.dart +++ b/lib/pages/pharmacies/screens/product-details/reviews_info.dart @@ -41,8 +41,8 @@ class ReviewsInfo extends StatelessWidget { // .reviews[index].customerId // .toString(), style: TextStyle( - fontSize: 17, - color: Colors.grey, + fontSize: 14, + color: Colors.black, fontWeight: FontWeight.w600), ), ), @@ -83,10 +83,10 @@ class ReviewsInfo extends StatelessWidget { ), ); }, - ) + ) : Container( padding: EdgeInsets.fromLTRB(15,15,15,20), - margin: EdgeInsets.only(bottom: 20), + margin: EdgeInsets.only(bottom: 40), alignment: Alignment.center, child: Text( TranslationBase.of(context).noReviewsAvailable, From 4d8271c45d24ec836024e793a0ee6f12929e7bda Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Thu, 25 Nov 2021 08:21:40 +0300 Subject: [PATCH 2/2] fix product details issue --- .../screens/product-details/product-name-and-price.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 e9099167..3a6f5c8d 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 @@ -121,8 +121,8 @@ class _ProductNameAndPriceState extends State { //color: widget.isStockAvailable ? Colors.white : Colors.red, ), // SizedBox(width: 20), - // if ( - widget.authenticatedUserObject.isLogin && + if ( + widget.authenticatedUserObject.isLogin) widget.stockAvailability != null && !widget.isStockAvailable && widget.customerId != null