[英]How to change the transition animation of "Navigator.pushNamed" to cupertino style in Flutter
As shown in the title, I want to change the transition animation of Navigator.pushNamed
to cupertino style, but I don't know how to do it.如标题所示,我想把
Navigator.pushNamed
的过渡动画改成cupertino风格,但是不知道怎么做。
Help me, plz.帮帮我,lz。
You can use this lines of code :您可以使用以下代码行:
theme: ThemeData(
pageTransitionsTheme: PageTransitionsTheme(
builders: {
TargetPlatform.android:
CupertinoPageTransitionsBuilderCustomBackGestureWidth(),
TargetPlatform.iOS:
CupertinoPageTransitionsBuilderCustomBackGestureWidth(),
},
),
),
All your transitions will be in cupertino style您所有的过渡都将采用库比蒂诺风格
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.