smf_bottom_tabs
The SMF module of the main navigation of the app as tabs in a bar at the bottom. It provides the layout role of SMF.
Features declare which of their routes are destinations of the main navigation, each with a label and an icon. This module generates AppShell, a Scaffold with a Material 3 NavigationBar that has a tab for each destination, and the router builds the main navigation around it, with a stack of its own for each tab. With one destination, the bar is hidden.
The bar shows at most five destinations, as the Material Design guidelines advise. With more, smf create leaves out the features of the destinations that do not fit, each with a warning, and generates the app without them; with --strict, it stops instead.
Use with the SMF CLI
smf create asks which module provides the layout, and offers none as well. To choose this one without the question:
smf create my_app -m home,bottom_tabs
The layout requires a router, which smf create adds when only one module provides it.
You don't add this package to an app yourself: smf create of the SMF CLI puts what the module generates into the app.
SMF generates apps for Flutter 3.44 or newer and Dart 3.12 or newer. It is tested on macOS, Linux and Windows.
Documentation
Libraries
- bundles/bottom_tabs_bundle
- smf_bottom_tabs
- The module of the main navigation of the app as tabs in a bar at the
bottom:
BottomTabsModule, a provider of the layout role of the SMF module model.