flutter - 如何使用 Navigator push to goto page1 to form3
问题描述
我尝试使用 PageView 和 bottomNavigationBar 构建一个演示应用程序。我的问题是如何使用 Navigator 推送或弹出并从第 1 页导航到表单 3。用户任何时候都可以取消仅表单 1、表单 2 或表单 3 的过程。
示例页面布局
AccountsSummary
page1
form1,
form2,
form3
page2
form1,
form2,
form3
page3
form1,
form2,
form3
提问如何使用 Navigator push to goto page1 to form3...</p>
new Scaffold(
body: new PageView(
children: [
new AccountsSummary(
index: this._page,
niyaziUserNo: "${widget.niyaziUserNo}"),
new CardsSummary(
index: this._page,
niyaziUserNo: "${widget.niyaziUserNo}"),
new TransfersSummary(
index: this._page,
niyaziUserNo: "${widget.niyaziUserNo}"),
],
onPageChanged: onPageChanged,
controller: _pageController,
),
bottomNavigationBar: new Theme(
child: new BottomNavigationBar(
items: [
new BottomNavigationBarItem(
icon: new Icon(Icons.account_balance_wallet),
title: new Text(“Accounts”,),
),
new BottomNavigationBarItem(
icon: new Icon(Icons.credit_card),
title: new Text(“Cards”,),
),
new BottomNavigationBarItem(
icon: new Icon(Icons.language),
title: new Text(“Transfer”,),
),
],
onTap: navigationTapped,
currentIndex: this._page,
),
),
),
解决方案
推荐阅读
- python - 根据数组中的给定列对python字典进行排序
- java - 计数器值在多线程中得到休息
- java - 如何在仍然调用超类方法的同时向覆盖的子类方法添加额外的实现
- reactjs - React / Redux:在reducer中更新对象的正确方法
- javascript - 如何从发布错误中重新选择单选按钮?
- java - RecyclerView.Adapter
混乱 - javascript - 用模型淘汰计算列
- jquery - 将循环中的项目 ID 传递给 Jquery
- python - 像 os.path.commonprefix 这样的库但返回任何 2+ 输入列表的公共前缀?
- ros - DJI Drone ROS 与 Remote Mavproxy 的连接