[英]What's the name of flutter widget that has icons bellow the screen?
What's the name of the Flutter widget that has icons below the screen and I can slide to right and left to change between these screens (Ex: Twitter main page)屏幕下方有图标的 Flutter 小部件的名称是什么,我可以左右滑动以在这些屏幕之间切换(例如:Twitter 主页)
I could create a Container
with a Row
and the Icons
and do this manually, but I suspect that already exists this widget on Flutter.我可以创建一个带有Row
和Icons
的Container
并手动执行此操作,但我怀疑 Flutter 上已经存在此小部件。
this bottom navigation bar can be done using BottomNavigationBar
in the bottomNavigationBar
property on your Scaffold
:这个底部导航栏可以使用BottomNavigationBar
在你的Scaffold
的bottomNavigationBar
属性中完成:
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
BottomNavigationBarItem(
icon: Icon(Icons.business), label: 'Business'),
BottomNavigationBarItem(icon: Icon(Icons.school), label: 'School'),
],
),
and for the slidable pages can be done using a PageView
widget:对于可滑动页面,可以使用PageView
小部件来完成:
PageView(
children: <Widget>[
ScreenOne(),
ScreenTwo(),
ScreenThree(),
],
);
and you can link both of them when you click an item in the BottomNavigationBar
, it will navigate to a specific page with a PageController
.当您单击BottomNavigationBar
中的项目时,您可以链接它们,它将导航到带有PageController
的特定页面。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.