Update the tag used for heroes
This commit is contained in:
parent
b98a3cc530
commit
63f90ca519
2 changed files with 6 additions and 3 deletions
|
@ -130,7 +130,10 @@ class _GalleryState extends State<Gallery> {
|
|||
Widget _buildPhoto(BuildContext context, Photo photo) {
|
||||
Widget thumbnail;
|
||||
if (_openedPhoto == null || _openedPhoto == photo) {
|
||||
thumbnail = Hero(tag: photo.hashCode, child: ThumbnailWidget(photo));
|
||||
thumbnail = Hero(
|
||||
tag: photo.generatedId.toString(),
|
||||
child: ThumbnailWidget(photo),
|
||||
);
|
||||
} else {
|
||||
thumbnail = ThumbnailWidget(photo);
|
||||
}
|
||||
|
|
|
@ -100,8 +100,8 @@ class _ZoomableImageState extends State<ZoomableImage>
|
|||
minScale: PhotoViewComputedScale.contained,
|
||||
gaplessPlayback: true,
|
||||
heroAttributes: PhotoViewHeroAttributes(
|
||||
tag: widget.photo.localId ??
|
||||
"uploaded_" + widget.photo.uploadedFileId.toString()),
|
||||
tag: widget.photo.generatedId.toString(),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return loadWidget;
|
||||
|
|
Loading…
Add table
Reference in a new issue