简体   繁体   English

屏幕下方有图标的 flutter 小部件的名称是什么?

[英]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.我可以创建一个带有RowIconsContainer并手动执行此操作,但我怀疑 Flutter 上已经存在此小部件。

this bottom navigation bar can be done using BottomNavigationBar in the bottomNavigationBar property on your Scaffold :这个底部导航栏可以使用BottomNavigationBar在你的ScaffoldbottomNavigationBar属性中完成:

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM