颤振:移至下一个屏幕时,CupertinoTabBar不会消失 [英] Flutter: CupertinoTabBar does not disappear when moving to the next screen
本文介绍了颤振:移至下一个屏幕时,CupertinoTabBar不会消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行Google的Flutter Gallery示例:
I'm running the Flutter Gallery example from Google:
在下面的gif文件中,请注意当我从一个屏幕导航到下一个屏幕时,库比蒂诺选项卡栏如何停留在屏幕底部. 出现这种情况的原因是,它是位于父小部件CupertinoNavigationDemo内的小部件,并且在将选项卡换入和换出视图时,选项卡栏仍保留.
In the gif below, notice how when I navigate from one screen to the next, the Cupertino Tab Bar stays at the bottom of the screen. The reason why this is the case is that it is a widget that lays within the parent widget CupertinoNavigationDemo and while the tabs are swapped in and out of the view, the tab bar remains.
导航时是否有摆脱标签栏的方法?
Is there a way to get rid of the Tab Bar when navigating?
推荐答案
设置rootNavigator: true
Navigator.of(context, rootNavigator: true).push(MaterialPageRoute(
builder: (context) => "your new routes",
));
这篇关于颤振:移至下一个屏幕时,CupertinoTabBar不会消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文