I am having trouble launching new screen widget.
(我无法启动新的屏幕小部件。)
I have main.dart where I am using bottomNavigationBar and body for ViewPager UI. (我有main.dart,其中我在ViewPager UI中使用bottomNavigationBar和body。)
Now I have 3 bottom tabs and when I go to 2nd tab's view and click on a button to launch another screen/view using: (现在我有3个底部标签,当我进入第二个标签的视图并单击一个按钮以启动另一个屏幕/视图时,使用:)
onTap: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => ViewMyContactList(),
),
)
the new screen replaces the 2nd tab's view, when I go to 3rd tab then come back to 2nd tab, the new screen is gone and 2nd tab's initial screen is back.
(新屏幕替换了第二个选项卡的视图,当我转到第三个选项卡然后返回到第二个选项卡时,新屏幕消失了,第二个选项卡的初始屏幕返回了。)
Also when new screen replaces the 2nd screen's initial view and when I do system back press in Android, the app exits straightaway. (同样,当新屏幕替换第二屏幕的初始视图时,当我在Android中进行系统后按时,该应用程序将立即退出。)
ask by rohitpaniker translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…