flutter bottomNavigationBar效果不佳

时间:2019-02-17 15:39:00

标签: flutter

我在bottomNavigationBar中使用了Scaffold。 但是,就像图片一样,iPhoneX的底部栏与我的bottomNavigationBar重叠。 我希望它永远不会与我重叠。 我可以自动执行吗?

https://github.com/flutter/flutter/issues/28080

      bottomNavigationBar: Container(
        decoration: BoxDecoration(
          gradient: LinearGradient(
            // Where the linear gradient begins and ends
            begin: Alignment(0.7, 1.0),
            end: Alignment(-0.7, -1.0),
            // Add one stop for each color. Stops should increase from 0 to 1
            // stops: [0.6, 0.7],
            colors: [
              // Colors are easy thanks to Flutter's Colors class.
              Color.fromRGBO(245, 243, 106, 1.0),
              Color.fromRGBO(177, 238, 111, 1.0),
            ],
          ),
        ),
        child:  FlatButton(
          child: Text(
            "TEST",
            style: TextStyle(color:Colors.white, fontSize: 18, fontWeight: FontWeight.bold),
          ),
          onPressed: () {
            Navigator.pop(context);
            _tabBloc.changeBottomTab(2);
          },
        )
      )

enter image description here

bottomNavigationBar: BottomNavigationBar(...)

enter image description here

0 个答案:

没有答案