simple flutter bottom navigation bar widget

Overview

bmnav

A very flexible Flutter implementation of the Bottom Navigation Bar.

Pub PayPal

BottomNavigationBar with label

BottomNavigationBar with label when selected

BottomNavigationBar without label

Get Started

Add bmanv to your pubspec.yaml file:

dependencies:
  bmnav: ^0.3.4

Import bmnav in your main.dart file:

import 'package:bmnav/bmnav.dart' as bmnav;

Implement bmnav.BottomNav in the bottomNavigationBar parameter in the Scaffold widget:

@override
Widget build(BuildContext ctx) {
	return Scaffold(
		appBar: AppBar(title: Text('Bottom Nav Demo')),
		body: Container(child: Text('Hello World')),
		bottomNavigationBar: bmnav.BottomNav(
			items: [
				bmnav.BottomNavItem(Icons.home),
				bmnav.BottomNavItem(Icons.fitness_center),
				bmnav.BottomNavItem(Icons.person),
				bmnav.BottomNavItem(Icons.view_headline)
			],
		),
	);
}

You can find a fully fledged example with navigation and custom styles here.

Props

Name Explanation Default
index starting index 0
onTap callback when a bottom nav item is pressed null
items bottom nav items null
elevation elevation of bottom nav 8.0
color background color Colors.white
iconStyle icon styles (size, onSelectSize, color, onSelectColor) null
labelStyle label styles (visible, showOnSelect, textStyle, onSelectTextStyle) null

Contributions

Feel free to contribute to this project.

Support

If you found this project to be useful then please consider donating to help me continue maintaining this project and create new projects. :)

Paypal Donate Button

You might also like...

Expandable bottom app bar widget for Flutter SDK

Expandable bottom app bar widget for Flutter SDK

Expandable bottom app bar widget for Flutter SDK

Dec 28, 2022

Flutter circle bottom bar by animation

Flutter circle bottom bar by animation

Animation circle bottom bar Flutter circle bottom bar by animation how to use: 1. add dependencies to pubspec.yaml: circle_bottombar: ^1.1.1 2. create

Oct 29, 2022

Notched Bottom Tab Bar Example using Flutter Framework

Notched Bottom Tab Bar Example using Flutter Framework

bottom_tab_bar Notched Bottom Tab Bar Example using Flutter Framework Getting Started Flutter tutorial explaining how to create a notched shaped botto

Dec 6, 2022

Doctor Consultation App in Flutter containing splash screen on boarding screen Routing state management Dash board Bottom navigation Decorated Drawer and Doctors Screen in the last.

Doctor Consultation App in Flutter containing splash screen on boarding screen  Routing  state management Dash board Bottom navigation Decorated Drawer and Doctors Screen in the last.

Online doctor Consultation App UI in Flutter Doctor Consultation App UI in Flutter Visit Website Features State Management Navigation Bar Responsive D

Jan 1, 2023

A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your issue.

A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your issue.

r_scan A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your iss

Nov 11, 2022

Starlight search bar - Starlight search bar with flutter

Starlight search bar - Starlight search bar with flutter

starlight_search_bar If you find the easiest way to search your item, this is fo

Apr 20, 2022

This is a JazzCash UI clone ( Modern Wallet App in Pakistan), implementing modern app bar animmation. One can take a concept of making app bar with animation.

jazzcash_ui This is a JazzCash UI clone ( Modern Wallet App in Pakistan), implementing modern app bar animmation. One can take a concept of making app

Nov 27, 2022

Flutter-FFNavigationBar - Configurable navigation bar for Flutter

Flutter-FFNavigationBar - Configurable navigation bar for Flutter

ff_navigation_bar A highly configurable navigation bar with emphasis for the selected item. Add dependency dependencies: ff_navigation_bar: ^0.1.5

Sep 22, 2022

Configurable navigation bar for Flutter

Configurable navigation bar for Flutter

ff_navigation_bar A highly configurable navigation bar with emphasis for the selected item. Add dependency dependencies: ff_navigation_bar: ^0.1.5

Sep 22, 2022
Comments
  • Select no tab

    Select no tab

    Hi. I would like to have no tab selected at startup and it does not seem to be possible actually due to the currentIndex = widget.index ?? 0; present in the BottomNavState class.

    Would it be possible to have no tab selected if index is null?

    [Edit]: I tried to remove that line and let currentIndex be null. It works and no item is selected. In addition to unselect an item I modified onItemClick:

      onItemClick(int i) {
        setState(() {
          if (i == currentIndex) {
            currentIndex = null;
          } else {
            currentIndex = i;
          }
        });
        if (widget.onTap != null) widget.onTap(i);
      }
    
    opened by synw 0
  • Can't Change tab manaully?

    Can't Change tab manaully?

    If i am tab 3 and when i press back button i want to jump to tab 0. It is possible.
    bottomNavigationBar: bmnav.BottomNav( index: currentIndex, onTap: (index) { currentIndex = index; setState(() {}); }, items: [ bmnav.BottomNavItem( CustomIcons.icon_home, label: 'Home', ), bmnav.BottomNavItem( CustomIcons.electro_1, label: 'Hot Deals', ), bmnav.BottomNavItem(CustomIcons.icon_card, label: 'Go Card'), ], ),

    When i change index manually and set state on tab changed.

    opened by smaharjan974 0
Owner
Edwin
ONE IS BETTER THAN ZERO
Edwin
simple flutter bottom navigation bar widget

bmnav A very flexible Flutter implementation of the Bottom Navigation Bar. Get Started Add bmanv to your pubspec.yaml file: dependencies: bmnav: ^0.

Edwin 21 Oct 8, 2022
A custom bottom navigation bar with box animation for flutter

A custom bottom navigation bar with box animation. This is inspired from some of the earlier designs, but in a more simplified and yet exiting way. De

SHIVAM SONI 1 Jul 31, 2022
New trick on how to create your own custom icons in flutter with bottom bar navigation

Customized Bottom Navigation Bar in Flutter | Tech With Sam Customized Bottom Navigation Bar in Flutter - Watch on youtube ✌   App Preview App Screens

Samuel Adekunle 10 Oct 26, 2022
This is repository for Spin Circle Bottom Navigation Bar Package for Flutter

Spin Circle Bottom Bar An easy to implement Spin Circle Bottom Navigation Bar for Flutter Applications. Current Features Initial Release for Spin Circ

Paras Jain 79 Dec 22, 2022
A 3D Bottom Navigation Bar in Flutter

flip_box_bar A 3D BottomNavigationBar inspired by Dribbble design by Dannniel [https://dribbble.com/shots/4811135-Tab-Bar-Cube-Interaction]. Demo Exam

Deven Joshi 258 Nov 19, 2022
Playful and customizable bottom navigation bar for Flutter

rolling_nav_bar A bottom nav bar with layout inspired by this design and with heavily customizable animations, colors, and shapes. Getting Started To

Craig Labenz 117 Dec 22, 2022
Custom Shaped Bottom Navigation Bar in Flutter

CustomShapedBottomBar Custom Shaped Bottom Navigation Bar in Flutter **Usage: ** Add CustomPaint Widget to use this Painter class like this: C

Shraddha Sojitra 5 May 6, 2022
Bottom navigation bar with sliding clip effect.

Sliding Clipped Nav Bar Design Credit Toolbar icons animation by Cuberto How to use? API reference barItems → List<BarItem> List of bar items that sho

Watery Desert 55 Dec 3, 2022
A fancy animated bottom navigation bar 💫.

Stacky_bottom_nav_bar A fancy animated bottom navigation bar. Preview Default Light Mode Default Dark Mode ⚠️ IMPORTANT: when adding this widget don’t

null 5 Oct 23, 2022
Animation nav bar - Flutter Animated Navigation Bar

Flutter Animated Navigation Bar Getting Started This project is a starting point

Sudesh Nishshanka Bandara 23 Dec 30, 2022