From a949c103d2158fc633566e3198142a3736c89790 Mon Sep 17 00:00:00 2001 From: Vishnu Mohandas Date: Sat, 6 Jun 2020 17:25:14 +0530 Subject: [PATCH] Fix hero attribute in gallery --- lib/ui/gallery.dart | 2 +- lib/ui/zoomable_image.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/gallery.dart b/lib/ui/gallery.dart index 1a2f3ca88..2649f7be6 100644 --- a/lib/ui/gallery.dart +++ b/lib/ui/gallery.dart @@ -101,7 +101,7 @@ class _GalleryState extends State { : null, ), child: Hero( - tag: photo.generatedId, + tag: photo.hashCode, child: ThumbnailWidget(photo), ), ), diff --git a/lib/ui/zoomable_image.dart b/lib/ui/zoomable_image.dart index 60c69e38f..82496afa7 100644 --- a/lib/ui/zoomable_image.dart +++ b/lib/ui/zoomable_image.dart @@ -52,7 +52,7 @@ class _ZoomableImageState extends State { scaleStateChangedCallback: _scaleStateChangedCallback, minScale: PhotoViewComputedScale.contained, gaplessPlayback: true, - heroAttributes: PhotoViewHeroAttributes(tag: widget.photo.generatedId), + heroAttributes: PhotoViewHeroAttributes(tag: widget.photo.hashCode), ); } else { return loadWidget;