2

我想从另一个页面隐藏底部栏底部栏在第 1 页中,我想在第 2 页滚动后隐藏它

所以我在 page1.dart 上有底部导航栏

Stack(
        children: <Widget>[
          IndexedStack(
            index: _currentIndex,
              children: _widgetOptions,
          ),
          Align(
            alignment: Alignment.bottomCenter,
            child: Container(
                margin: EdgeInsets.only(bottom: 30),
                height: 59,
                width: 80 / 100 * MediaQuery.of(context).size.width,
                /*decoration: BoxDecoration(
                    boxShadow: [
                      BoxShadow(
                        color: Colors.black54,
                        blurRadius: 10.0,
                      ),
                    ],
                    color: Colors.white,
                    borderRadius: BorderRadius.circular(30),
                  ),*/
                child: Card(

                  elevation: 10,
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(30),
                  ),
                  child: Row(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: <Widget>[
                      _buildItem(FeatherIcons.home, 0),
                      Stack(children: <Widget>[
                        _buildItem(FeatherIcons.bell, 1),
                        notification==0?SizedBox(height: 0,width: 0,):
                        Positioned(
                            top: -1.0,
                            right: -1.0,
                            child: new Stack(
                              children: <Widget>[
                                new Icon(
                                  Icons.brightness_1,
                                  size: 12.0,
                                  color: base,
                                ),
                              ],
                            ))
                      ]),
                      _buildItem(FeatherIcons.plusCircle, 2),


                      /*  Container(
                        width: 50,

                        child: RaisedButton(
                          elevation: 5,
                          child:Icon(FeatherIcons.plusCircle,color: Colors.white,),
                          onPressed: () {},
                          color: Colors.redAccent,
                          shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(20),
                          ),
                        ),
                      ),*/
                      /*  Icon(
                          FeatherIcons.plusCircle,
                          color: Colors.red,
                          size: 30,
                        ),*/
                      _buildItem(FeatherIcons.messageSquare, 3),
                      _buildItem(FeatherIcons.user, 4),
                    ],
                  ),
                )),
          )
        ],
      ),
    ),
  ),

和 _widgetOptions

List<Widget> _widgetOptions = <Widget>[
feed(),notific(),postpagee(),Text(
  'Index 2: School',
),
profilee()  ];

如何隐藏上面代码中使用容器制作的底部导航..从滚动列表视图的另一个页面我已经看到其他示例购买他们只是将所有代码都放在同一页面中以获取甚至列表视图,当您的应用程序具有多个功能时这是不可能的同一页

4

0 回答 0