From 92540041253d3782982852ad4f1c9d245b4f45c0 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 6 Oct 2021 16:26:27 +0300 Subject: [PATCH] fix coloring issue --- .../screens/product-details/product-detail.dart | 1 + .../shared/product_details_app_bar.dart | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/pages/pharmacies/screens/product-details/product-detail.dart b/lib/pages/pharmacies/screens/product-details/product-detail.dart index f3524b35..b1bc4f4b 100644 --- a/lib/pages/pharmacies/screens/product-details/product-detail.dart +++ b/lib/pages/pharmacies/screens/product-details/product-detail.dart @@ -98,6 +98,7 @@ class __ProductDetailPageState extends State{ isShowDecPage: false, customAppBar: ProductAppBar( product: widget.product, + quantity: quantity, model: model, addToWishlistFunction: (item) { addToWishlistFunction(itemID:item,model:model); diff --git a/lib/pages/pharmacies/screens/product-details/shared/product_details_app_bar.dart b/lib/pages/pharmacies/screens/product-details/shared/product_details_app_bar.dart index 13547fd1..99dfd546 100644 --- a/lib/pages/pharmacies/screens/product-details/shared/product_details_app_bar.dart +++ b/lib/pages/pharmacies/screens/product-details/shared/product_details_app_bar.dart @@ -20,7 +20,12 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget { final Function addToWishlistFunction; final int quantity; - ProductAppBar({Key key, this.product, this.model, this.addToWishlistFunction, this.quantity}) + ProductAppBar( + {Key key, + this.product, + this.model, + this.addToWishlistFunction, + this.quantity}) : super(key: key); AuthenticatedUserObject authenticatedUserObject = @@ -71,7 +76,8 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget { icon: FontAwesomeIcons.ellipsisV, color: Colors.grey, onPress: () { - settingModalBottomSheet(context); + settingModalBottomSheet( + context); }, ), ], @@ -84,7 +90,6 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget { ); } - @override @override Size get preferredSize => Size(double.maxFinite, 50); @@ -121,8 +126,9 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget { title: Text( TranslationBase.of(context).addToWishlist, ), - onTap: () => - {addToWishlistFunction(itemID: itemID, model: model)}, + onTap: () { + addToWishlistFunction(itemID: itemID, model: model); + }, ), ListTile( leading: Icon(Icons.compare),