Skip to content

BottomNavigationBar ​

A BottomNavItem-driven bottom nav bar with a standard and an elevated look.

View source on GitHub ↗

CLI ​

Install this component into your project:

bottom-navigation-bar
$flutter_beautify add bottom-navigation-bar

Variants ​

FBBottomNavigationBar.standard() · FBBottomNavigationBar.elevated()

Key parameters ​

ParameterTypeDefault
itemsList<BottomNavItem>required
selectedIndexint0
onItemSelectedValueChanged<int>?—
activeColorColor?ambient colorScheme.primary

Usage ​

dart
import 'package:your_app/widgets/bottom_navigation_bar.dart';

Scaffold(
  bottomNavigationBar: FBBottomNavigationBar.elevated(
    items: navItems,
    selectedIndex: index,
    onItemSelected: (i) => setState(() => index = i),
  ),
);

Released under the MIT License.