简体   繁体   中英

Flutter: iOS NavigationBar Transition

Is it possible to replicate this navigation bar transition effect using Cupertino Widgets ?

在此处输入图片说明

I may not be using the widgets correctly.
And looking at some examples, I have not found any that shows exactly this effect.

If you want to have a slide transition like iOS , you use CupertinoPageRoute :

CupertinoPageRoute.
Navigator.push(
    context, CupertinoPageRoute(builder: (context) => Screen2()))

further you can see CupertinoPageRoute

There is also a widget known as PageView you can check. Maybe that would help

The simple answer is not currently. See this bug - it's something that's being considered by the flutter team but not currently implemented. It's in the Milestone they hope to complete by the 1.0 release (but that could be a while).

That being said, you could do it yourself with a bit of work. You could start with something like the answer here but animate the AppBar instead of the NavigationBar. Not a particularly pretty solution, but it would work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM