From b68882f75588b947c4915762cac952831c14d406 Mon Sep 17 00:00:00 2001 From: tomasz-trela Date: Sun, 26 Jan 2025 18:16:32 +0100 Subject: [PATCH] fix(digital-guide): infinite 1 image carousel --- .../presentation/widgets/digital_guide_photo_row.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/features/digital_guide_view/presentation/widgets/digital_guide_photo_row.dart b/lib/features/digital_guide_view/presentation/widgets/digital_guide_photo_row.dart index 87e418dd..a7981887 100644 --- a/lib/features/digital_guide_view/presentation/widgets/digital_guide_photo_row.dart +++ b/lib/features/digital_guide_view/presentation/widgets/digital_guide_photo_row.dart @@ -39,10 +39,14 @@ class DigitalGuidePhotoRow extends StatelessWidget { DigitalGuideConfig.borderRadiusMedium, ), child: GestureDetector( - onTap: () async => showGallery(context, initId: id), + onTap: () async { + if (imagesIDs.length != 1) { + await showGallery(context, initId: id); + } + }, child: DigitalGuideImage( id: id, - zoomable: false, + zoomable: imagesIDs.length == 1, ), ), ),