首页 > 解决方案 > 如何使用 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,
    ),
  ),
),

标签: flutterbottomnavigationviewpageviews

解决方案


推荐阅读