Each guide moves one bottom bar to flutter_floating_bottom_bar. It shows the
code before and after, maps every property, and lists what behaves
differently.
| From | Guide | Live demo |
|---|---|---|
Flutter BottomNavigationBar |
bottom-navigation-bar.md | item-theme |
Flutter NavigationBar (Material 3) |
navigation-bar.md | indicators |
google_nav_bar |
google-nav-bar.md | indicators |
convex_bottom_bar |
convex-bottom-bar.md | center-action |
salomon_bottom_bar |
salomon-bottom-bar.md | item-theme |
persistent_bottom_nav_bar_v2 |
persistent-bottom-nav-bar-v2.md | go-router-shell |
animated_bottom_navigation_bar |
animated-bottom-navigation-bar.md | center-action |
- Add the package with
flutter pub add flutter_floating_bottom_bar. - Since 3.0.0 the package uses
package:material_ui/material_ui.dartfor Material. The after snippets import it in place ofpackage:flutter/material.dart. See the 3.0.0 notes. - Every after snippet is a file in
example/lib/migratethat compiles and runs in the example app's tests. - APIs marked "since 3.1.0" need version 3.1.0 or later. Each guide says what to use on 3.0.1.
- Put a
BottomBarinScaffold.body. RemovebottomNavigationBar. - Put your pages in
BottomBar.body, wrapped inBottomBarBodyPadding. - Put a
BottomBarItemsrow ofBottomBarItems inBottomBar.child. - Remove the old package with
flutter pub remove <package>.
The bar hides when the body scrolls down and shows when it scrolls up. Set
scrollBehavior: const BottomBarScrollBehavior(hideOnScroll: false) to keep
it on screen.
For a bar this list does not cover, such as BottomAppBar or a hand-rolled
Container, see the
replacing bars notes.