responsive_navigation_bar
Version 8.x requires Flutter 3.47 or newer. Provide button text for screen-reader labels, including icon-only layouts. Selection is controlled by your app: update selectedIndex inside setState when onTabChange fires.
import 'package:material_ui/material_ui.dart';
import 'package:responsive_navigation_bar/responsive_navigation_bar.dart';
// In your State's build method, with `int selectedIndex = 0` as a field:
return Scaffold(
body: Center(child: Text('Tab $selectedIndex')),
bottomNavigationBar: ResponsiveNavigationBar(
selectedIndex: selectedIndex,
onTabChange: (index) => setState(() => selectedIndex = index),
navigationBarButtons: const [
NavigationBarButton(text: 'Home', icon: Icons.home),
NavigationBarButton(text: 'Settings', icon: Icons.settings),
],
),
);
Getting Started
Flutter 3.47+
dependencies:
material_ui: ^1.11.0
responsive_navigation_bar: ^8.0.0+1
Flutter 3.41–<3.47
dependencies:
responsive_navigation_bar: ^7.0.0
Flutter 3.29–<3.41
dependencies:
responsive_navigation_bar: ^6.2.1
The widget API is unchanged. The example also requires Flutter 3.47. Mobile host apps follow Flutter’s minimums (iOS 15 and Android API 24 on Flutter 3.47), or any higher minimum required by the app.
Features
-
Very easy to set up, beginner friendly
-
Everything is documented + you will be asked to add required values - the rest is optional (with sound null safety)
-
By default, text size, icon size and button padding are responsive (change size with screen size)
-
Set
iconSizeto control icon size independently (defaults tofontSizeif not specified) -
Optional: Beautiful gradient (
backgroundGradient) for navigation bar and/or buttons (or solid colors) -
Optional: Colored borders (
border) for navigation bar and/or buttons -
Optional: Change the opacity (
backgroundOpacity) of the bar's solid background; gradients retain their own opacity -
Optional: Blurred background (
backgroundBlur) from the top of the navigation bar to the bottom of the screen -
Optional: Separate border radius controls (
borderRadius,buttonBorderRadius) -
Optional: Control button spacing (
buttonSpacing) -
By default shows text on selected button, optionally show on inactive buttons too (
showInactiveButtonText) -
Only StatelessWidgets
-
How to make the
bottomNavigationBarfloat above theScaffold's body:
Scaffold(
extendBody: true,
body: SafeArea(bottom: false, ...),
bottomNavigationBar: ...
...
)
- Colors in the example GIFs below:
backgroundColor:
Theme.of(context).brightness == Brightness.dark
? const Color(0xff3c3c3c)
: const Color(0xffbebebe),
inactiveIconColor:
Theme.of(context).brightness == Brightness.dark
? const Color(0xffaaaaaa)
: const Color(0xff969696),
ResponsiveNavigationBar in Action
With animation

Without animation

Todo
- Add feature requests
- Merge your pull requests