Skip to content

Add hero widget to advanced image.#179

Merged
jwr1 merged 3 commits intomainfrom
image_animation
May 15, 2025
Merged

Add hero widget to advanced image.#179
jwr1 merged 3 commits intomainfrom
image_animation

Conversation

@olorin99
Copy link
Copy Markdown
Contributor

Adds a hero widget to advanced image to give an animation when opening an image or navigating to an image post.
The 'hero' parameter in AdvancedImage is so cross posted images have an unique tag otherwise they don't animate properly when multiple of the same image are shown in a feed.

Copy link
Copy Markdown
Member

@jwr1 jwr1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I actually did look into using Hero over a year ago (although it was for opening the whole post, not the image), so I'm glad you were able to loop back to this.

Comment thread lib/src/widgets/image.dart Outdated
Comment thread lib/src/widgets/image.dart
@olorin99
Copy link
Copy Markdown
Contributor Author

Would you like me to add another hero animation for whole posts as well as images?

@jwr1
Copy link
Copy Markdown
Member

jwr1 commented May 14, 2025

Would you like me to add another hero animation for whole posts as well as images?

Sure, might as well!

@olorin99
Copy link
Copy Markdown
Contributor Author

That should fix the animation issues. The problem was flutter can't animate between different BoxFits so keeping the same fit between image and image page and using Center to keep the image contained should solve the problem.

@olorin99 olorin99 requested a review from jwr1 May 15, 2025 02:08
Copy link
Copy Markdown
Member

@jwr1 jwr1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, it looks great!

@jwr1 jwr1 merged commit 0e7b6ff into main May 15, 2025
2 checks passed
@jwr1 jwr1 deleted the image_animation branch May 15, 2025 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants