From 4a5d4e3ebdec92c672efd677197ea3096807f071 Mon Sep 17 00:00:00 2001 From: Edouard Marquez Date: Thu, 14 Nov 2024 05:32:04 +0100 Subject: [PATCH] ClipRrect needed --- .../product/product_image_gallery_view.dart | 131 +++++++++--------- 1 file changed, 67 insertions(+), 64 deletions(-) diff --git a/packages/smooth_app/lib/pages/product/product_image_gallery_view.dart b/packages/smooth_app/lib/pages/product/product_image_gallery_view.dart index 0f1565209b1..72217eb9805 100644 --- a/packages/smooth_app/lib/pages/product/product_image_gallery_view.dart +++ b/packages/smooth_app/lib/pages/product/product_image_gallery_view.dart @@ -237,77 +237,80 @@ class _PhotoRow extends StatelessWidget { context: context, initialImageIndex: position, ), - child: Column( - children: [ - SizedBox( - height: itemHeight, - child: Row( - children: [ - _PhotoRowIndicator(transientFile: transientFile), - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: SMALL_SPACE, - ), - child: Row( - children: [ - Expanded( - child: AutoSizeText( - label, - maxLines: 2, - minFontSize: 10.0, - style: const TextStyle( - fontSize: 15.0, - height: 1.2, - fontWeight: FontWeight.bold, - color: Colors.white, + child: ClipRRect( + borderRadius: ANGULAR_BORDER_RADIUS, + child: Column( + children: [ + SizedBox( + height: itemHeight, + child: Row( + children: [ + _PhotoRowIndicator(transientFile: transientFile), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: SMALL_SPACE, + ), + child: Row( + children: [ + Expanded( + child: AutoSizeText( + label, + maxLines: 2, + minFontSize: 10.0, + style: const TextStyle( + fontSize: 15.0, + height: 1.2, + fontWeight: FontWeight.bold, + color: Colors.white, + ), ), ), - ), - const SizedBox(width: SMALL_SPACE), - CircledArrow.right( - color: extension.primaryDark, - type: CircledArrowType.normal, - circleColor: Colors.white, - size: 20.0, - ), - ], + const SizedBox(width: SMALL_SPACE), + CircledArrow.right( + color: extension.primaryDark, + type: CircledArrowType.normal, + circleColor: Colors.white, + size: 20.0, + ), + ], + ), ), ), - ), - ], + ], + ), ), - ), - Expanded( - child: Stack( - children: [ - Positioned.fill( - child: LayoutBuilder( - builder: (BuildContext context, BoxConstraints box) { - return ProductPicture( - product: product, - imageField: imageField, - size: Size(box.maxWidth, box.maxHeight), - onTap: null, - errorTextStyle: const TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.w600, - ), - heroTag: ProductImageSwipeableView.getHeroTag( - imageField, - ), - ); - }), - ), - if (transientFile.isImageAvailable() && - !transientFile.isServerImage()) - const Center( - child: CloudUploadAnimation.circle(size: 50.0), + Expanded( + child: Stack( + children: [ + Positioned.fill( + child: LayoutBuilder(builder: + (BuildContext context, BoxConstraints box) { + return ProductPicture( + product: product, + imageField: imageField, + size: Size(box.maxWidth, box.maxHeight), + onTap: null, + errorTextStyle: const TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + ), + heroTag: ProductImageSwipeableView.getHeroTag( + imageField, + ), + ); + }), ), - ], + if (transientFile.isImageAvailable() && + !transientFile.isServerImage()) + const Center( + child: CloudUploadAnimation.circle(size: 50.0), + ), + ], + ), ), - ), - ], + ], + ), ), ), ),