Browse Source

Fix hero attribute in gallery

Vishnu Mohandas 5 years ago
parent
commit
a949c103d2
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lib/ui/gallery.dart
  2. 1 1
      lib/ui/zoomable_image.dart

+ 1 - 1
lib/ui/gallery.dart

@@ -101,7 +101,7 @@ class _GalleryState extends State<Gallery> {
               : null,
         ),
         child: Hero(
-          tag: photo.generatedId,
+          tag: photo.hashCode,
           child: ThumbnailWidget(photo),
         ),
       ),

+ 1 - 1
lib/ui/zoomable_image.dart

@@ -52,7 +52,7 @@ class _ZoomableImageState extends State<ZoomableImage> {
         scaleStateChangedCallback: _scaleStateChangedCallback,
         minScale: PhotoViewComputedScale.contained,
         gaplessPlayback: true,
-        heroAttributes: PhotoViewHeroAttributes(tag: widget.photo.generatedId),
+        heroAttributes: PhotoViewHeroAttributes(tag: widget.photo.hashCode),
       );
     } else {
       return loadWidget;