Vueer
Vueer

Reputation: 1502

Building specific Navigation animation with Flutter

Is there a way to build such an effect with Flutter by navigate from one page to another?

enter image description here

Do you have an idea to build an effect like that? I would post code examples, but I really have no idea how to do anything like this...

Upvotes: 0

Views: 62

Answers (2)

Zeeshan Hussain
Zeeshan Hussain

Reputation: 842

You can Hero Widget to achieve this.

In the first screen wrap your image with Hero widget and provide it with a tag. In the second screen wrap your image with Hero widget and provide it with the same tag.

Hero(
  tag: 'firstImage'
  child: Image.asset('images/1.png'),
)

You can watch the Hero widget video in the Flutter widget of week https://www.youtube.com/watch?v=Be9UH1kXFDw&feature=emb_logo.

To read more about the hero widget, you can checkout https://flutter.dev/docs/development/ui/animations/hero-animations.

Upvotes: 0

hisam
hisam

Reputation: 1609

I think the navigations between those pages are the Hero Animations.

As for another transition, you can use this package.

I hope it will help you.

Upvotes: 1

Related Questions