From c8eaf9a209ccf419715a74d50c048359928b136d Mon Sep 17 00:00:00 2001 From: "Aamir.Muhammad" Date: Wed, 8 Jul 2026 16:33:40 +0300 Subject: [PATCH] Offers And Discounts Complete --- .../offers_and_discounts_page.dart | 1 - .../widgets/offers_and_discounts.dart | 67 ++++++++----------- 2 files changed, 27 insertions(+), 41 deletions(-) diff --git a/lib/presentation/offers_and_discounts/offers_and_discounts_page.dart b/lib/presentation/offers_and_discounts/offers_and_discounts_page.dart index 741fd61a..0c8150f4 100644 --- a/lib/presentation/offers_and_discounts/offers_and_discounts_page.dart +++ b/lib/presentation/offers_and_discounts/offers_and_discounts_page.dart @@ -206,7 +206,6 @@ class _OffersAndDiscountsPageState extends State { ? GestureDetector( onTap: () { _searchController.clear(); - // bookAppointmentsViewModel.filterClinics(""); offersAndDiscountVM.setSearchQuery(""); textFocusNode.unfocus(); }, diff --git a/lib/presentation/offers_and_discounts/widgets/offers_and_discounts.dart b/lib/presentation/offers_and_discounts/widgets/offers_and_discounts.dart index ca26f925..118db771 100644 --- a/lib/presentation/offers_and_discounts/widgets/offers_and_discounts.dart +++ b/lib/presentation/offers_and_discounts/widgets/offers_and_discounts.dart @@ -154,49 +154,36 @@ class _OffersAndDiscountsCarouselState extends State shape: SmoothRectangleBorder( borderRadius: BorderRadius.circular(13.r), smoothness: 0.6, - side: BorderSide( - color: Color(0xff2E3039), - width: 2.w, - ), + side: BorderSide(color: Color(0xff2E3039), width: 2.w), ), ), - child: ClipRRect( - borderRadius: BorderRadius.circular(13.r), + child: Padding( + padding: const EdgeInsets.all(2.0), child: Container( - decoration: BoxDecoration( - border: Border.all(color: AppColors.textColor, width: 2.w), - borderRadius: BorderRadius.circular(11.r), - ), - child: Padding( - padding: const EdgeInsets.all(2.0), - child: ClipRRect( - borderRadius: BorderRadius.circular(11.r), - child: imageUrl.isNotEmpty - ? Utils.buildImgWithNetwork( - url: imageUrl, - fit: BoxFit.cover, - iconColor: AppColors.blackBgColor, - errorBuilder: (context, error, stackTrace) { - return Container( - color: AppColors.greyColor, - child: Icon( - Icons.image_not_supported, - size: 24.h, - color: AppColors.greyTextColor, - ), - ); - }, - ) - : Container( - color: AppColors.greyColor, - child: Icon( - Icons.local_offer, - size: 24.h, - color: AppColors.greyTextColor, - ), - ), - ), - ), + decoration: ShapeDecoration( + shape: SmoothRectangleBorder( + borderRadius: BorderRadius.circular(13.r), + smoothness: 0.6, + side: BorderSide(color: AppColors.whiteColor, width: 2.w), + ), + image: DecorationImage(image: NetworkImage(imageUrl))), + + // child: imageUrl.isNotEmpty + // ? Utils.buildImgWithNetwork( + // url: imageUrl, + // fit: BoxFit.cover, + // iconColor: AppColors.blackBgColor, + // errorBuilder: (context, error, stackTrace) { + // return Container( + // color: AppColors.greyColor, + // child: Icon(Icons.image_not_supported, size: 24.h, color: AppColors.greyTextColor), + // ); + // }, + // ) + // : Container( + // color: AppColors.greyColor, + // child: Icon(Icons.local_offer, size: 24.h, color: AppColors.greyTextColor), + // ), ), ), );