bmnav_null_safety 1.0.1 copy "bmnav_null_safety: ^1.0.1" to clipboard
bmnav_null_safety: ^1.0.1 copied to clipboard

A highly flexible Flutter implementation of the Bottom Navigation Bar.

bmnav_null_safety #

This is forked from bmnav to migrate to null safety, nothing else.

A very flexible Flutter implementation of the Bottom Navigation Bar.

BottomNavigationBar with label

BottomNavigationBar with label when selected

BottomNavigationBar without label

Get Started #

Add bmnav_null_safety to your pubspec.yaml file:

dependencies:
  bmnav_null_safety:

Import bmnav_null_safety in your main.dart file:

import 'package:bmnav_null_safety/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.

3
likes
120
pub points
53%
popularity

Publisher

verified publisherproblemsolved-os.blogspot.com

A highly flexible Flutter implementation of the Bottom Navigation Bar.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on bmnav_null_safety