Fix hero attribute in gallery

This commit is contained in:
Vishnu Mohandas 2020-06-06 17:25:14 +05:30
parent 258ec7259e
commit a949c103d2
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -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;