Sitemap
Zeeshan Ali

Zeeshan Ali

Flutter app developer having 6 years of experience.

Flutter Bottom Navigation Bar Customization

2 min readJul 17, 2023

--

Press enter or click to view image in full size

In this tutorial, we will be discussing how to implement Flutter bottom navigation bar. We’ll see what it is and then with the help of practical Flutter code examples, we’ll implement and customize it.

Introduction: Flutter Bottom Navigation Bar

As the name suggests, it can be used for navigation in the Flutter app. It is a bar that is at the bottom of the Flutter app having some options, buttons, icons, etc. We can navigate to different pages by clicking these options in the flutter bottom navigation bar. Let’s jump into its practical implementation.

Bottom Navigation Bar in Flutter (Implementation)

bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(label: 'email', icon: Icon(Icons.email)),
BottomNavigationBarItem(label: 'logout', icon: Icon(Icons.logout)),
               ])

Flutter scaffold has a constructor named bottom navigation bar and we can pass our bottom navigation bar class using that constructor. The bottom navigation bar has a constructor named items which takes a list of bottom navigation bar items, these items will be shown in the navigation bar.

Get Zeeshan Ali’s stories in your inbox

Join Medium for free to get updates from this writer.

In the above code we have used two items, the label is necessary otherwise it will give an error and we have given it icons. You can see in the above image how it looks.

Minimum Two Items In Bottom Navigation Bar

At least two items are necessary for the bottom navigation bar or else it will give an error.

Item Colors In Bottom Navigation Bar

bottomNavigationBar: BottomNavigationBar(
unselectedItemColor: Colors.grey,
selectedItemColor: Colors.blue,
items: [
BottomNavigationBarItem(label: 'email', icon: Icon(Icons.email)),
BottomNavigationBarItem(label: 'Chat', icon: Icon(Icons.chat)),
BottomNavigationBarItem(label: 'Notifications', icon: Icon(Icons.notifications)),
BottomNavigationBarItem(label: 'logout', icon: Icon(Icons.logout)),
])

Selected Color

selectedItemColor: Colors.blue,

We can make the selected item color set to any type of color using the selected item color constructor of the Flutter bottom navigation bar. Continue reading…

--

--

Zeeshan Ali
Zeeshan Ali

Flutter app developer having 6 years of experience.