package library
a beautiful animated flutter widget package library. the tab bar will attempt to use your current theme out of the box, however you may want to theme it.
getting started
add the plugin:
dependencies:
motion_tab_bar: ^0.0.1
basic usage
adding the widget
motiontabcontroller _tabcontroller;
@override
void initstate() {
super.initstate();
_tabcontroller = new motiontabcontroller(vsync: this);
}
@override
void dispose() {
super.dispose();
_tabcontroller.dispose();
}
bottomnavigationbar: motiontabbar(
tabonename: "home",
tabtwoname: "search",
tabthreename: "account",
taboneicon: icons.home,
tabtwoicon: icons.search,
tabthreeicon: icons.account_box,
tabiconcolor: colors.green,
tabselectedcolor: colors.red,
textstyle: textstyle(color: colors.red),
ontabitemselected: (int value){
print(value);
setstate(() {
_tabcontroller.index = value;
});
},
)
Comments are closed.