mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(mobile): Fixes hero animation on main timeline (#1924)
* fixed hero animation for local assets * fixes backwards hero animation out of gallery image
This commit is contained in:
@@ -259,7 +259,6 @@ class _PhotoViewGalleryState extends State<PhotoViewGallery> {
|
||||
controller: pageOption.controller,
|
||||
scaleStateController: pageOption.scaleStateController,
|
||||
customSize: widget.customSize,
|
||||
heroAttributes: pageOption.heroAttributes,
|
||||
scaleStateChangedCallback: scaleStateChangedCallback,
|
||||
enableRotation: widget.enableRotation,
|
||||
initialScale: pageOption.initialScale,
|
||||
@@ -289,7 +288,6 @@ class _PhotoViewGalleryState extends State<PhotoViewGallery> {
|
||||
scaleStateController: pageOption.scaleStateController,
|
||||
customSize: widget.customSize,
|
||||
gaplessPlayback: widget.gaplessPlayback,
|
||||
heroAttributes: pageOption.heroAttributes,
|
||||
scaleStateChangedCallback: scaleStateChangedCallback,
|
||||
enableRotation: widget.enableRotation,
|
||||
initialScale: pageOption.initialScale,
|
||||
@@ -310,6 +308,19 @@ class _PhotoViewGalleryState extends State<PhotoViewGallery> {
|
||||
errorBuilder: pageOption.errorBuilder,
|
||||
);
|
||||
|
||||
if (pageOption.heroAttributes != null) {
|
||||
return Hero(
|
||||
tag: pageOption.heroAttributes!.tag,
|
||||
createRectTween: pageOption.heroAttributes!.createRectTween,
|
||||
flightShuttleBuilder: pageOption.heroAttributes!.flightShuttleBuilder,
|
||||
placeholderBuilder: pageOption.heroAttributes!.placeholderBuilder,
|
||||
transitionOnUserGestures: pageOption.heroAttributes!.transitionOnUserGestures,
|
||||
child: ClipRect(
|
||||
child: photoView,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return ClipRect(
|
||||
child: photoView,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user