Emerson Brancher
Emerson Brancher

Reputation: 13

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 want to make my main page with those four icons like this image

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.

Upvotes: 1

Views: 71

Answers (1)

Gwhyyy
Gwhyyy

Reputation: 9166

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.

Upvotes: 1

Related Questions