fancy bottom navigation
flutter plugin – fancy bottom navigation.
getting started
add the plugin (pub coming soon):
dependencies:
...
fancy_bottom_navigation: ^0.1.0
limitations
for now this is limited to more than 1 tab, and less than 5. so 2-4 tabs.
basic usage
bottomnavigationbar: fancybottomnavigation(
tabs: [
tabdata(icondata: icons.home, title: "home"),
tabdata(icondata: icons.search, title: "search"),
tabdata(icondata: icons.shopping_cart, title: "basket")
],
context: context,
ontabchangedlistener: (position) {
setstate(() {
currentpage = position;
});
},
)
attributes
required
tabs -> list of tabdata
objects
ontabchangedlistener -> function to handle a tap on a tab, receives int position
optional
initialselection -> defaults to 0
circlecolor -> defaults to null, derives from theme
activeiconcolor -> defaults to null, derives from theme
inactiveiconcolor -> defaults to null, derives from theme
taxtcolor -> defaults to null, derives from theme
barbagroundcolor -> defaults to null, derives from theme
theming
the bar will attempt to use your current theme out of the box, however you may want to theme it. here are the attributes:
Comments are closed.