简体   繁体   中英

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)

我想用这四个图标制作我的主页,就像这张图片

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.

this bottom navigation bar can be done using BottomNavigationBar in the bottomNavigationBar property on your Scaffold :

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(
        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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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