diff --git a/lib/models/file.dart b/lib/models/file.dart index bc7db3197..abb839cf9 100644 --- a/lib/models/file.dart +++ b/lib/models/file.dart @@ -128,4 +128,11 @@ class File { int get hashCode { return generatedId.hashCode ^ uploadedFileId.hashCode ^ localId.hashCode; } + + String heroTag() { + return "local_" + + localId.toString() + + ":remote_" + + uploadedFileId.toString(); + } } diff --git a/lib/ui/gallery.dart b/lib/ui/gallery.dart index 3db2da4ac..e952521e9 100644 --- a/lib/ui/gallery.dart +++ b/lib/ui/gallery.dart @@ -176,7 +176,7 @@ class _GalleryState extends State { : null, ), child: Hero( - tag: file.generatedId.toString(), + tag: file.heroTag(), child: ThumbnailWidget(file), ), ), diff --git a/lib/ui/zoomable_image.dart b/lib/ui/zoomable_image.dart index 7dbfbeb18..c08f073ec 100644 --- a/lib/ui/zoomable_image.dart +++ b/lib/ui/zoomable_image.dart @@ -59,7 +59,7 @@ class _ZoomableImageState extends State minScale: PhotoViewComputedScale.contained, gaplessPlayback: true, heroAttributes: PhotoViewHeroAttributes( - tag: widget.photo.generatedId.toString(), + tag: widget.photo.heroTag(), ), ); } else { diff --git a/pubspec.lock b/pubspec.lock index 73431cae9..d8479b821 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: cached_network_image url: "https://pub.dartlang.org" source: hosted - version: "2.2.0+1" + version: "2.3.0-rc" characters: dependency: transitive description: @@ -181,6 +181,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_blurhash: + dependency: transitive + description: + name: flutter_blurhash + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.0" flutter_cache_manager: dependency: transitive description: @@ -324,6 +331,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.8" + octo_image: + dependency: transitive + description: + name: octo_image + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.1" open_iconic_flutter: dependency: transitive description: @@ -639,4 +653,4 @@ packages: version: "2.2.1" sdks: dart: ">=2.9.0-14.0.dev <3.0.0" - flutter: ">=1.13.8 <2.0.0" + flutter: ">=1.19.0-2.0.pre <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 349a42cbb..ee64adfc6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -53,7 +53,7 @@ dependencies: extended_image: ^0.9.0 video_player: ^0.10.11+1 chewie: ^0.9.10 - cached_network_image: ^2.2.0+1 + cached_network_image: ^2.3.0-beta dev_dependencies: flutter_test: