mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +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:
parent
a5f49b065c
commit
dac4020f27
3 changed files with 51 additions and 7 deletions
|
|
@ -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,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue