AnimatedBottomNavigationBar is a customizable widget inspired by dribble shot.
With AnimatedBottomNavigationBar.builder you are able to customize tab view however you need. In this case you are responsible to handle an active(inactive) state of tabs.
Getting Started
To get started, place your AnimatedBottomNavigationBar or AnimatedBottomNavigationBar.builder in the bottomNavigationBar slot of a Scaffold.
The AnimatedBottomNavigationBar respects FloatingActionButton location.
For example:
You have to change the active navigation bar tab programmatically by passing a new activeIndex to the AnimatedBottomNavigationBar widget.
class_MyAppStateextendsState<MyApp> {
int activeIndex;
/// Handler for when you want to programmatically change/// the active index. Calling `setState()` here causes/// Flutter to re-render the tree, which `AnimatedBottomNavigationBar`/// responds to by running its normal animation.void_onTap(int index) {
setState((){
activeIndex = index;
});
}
Widgetbuild(BuildContext context) {
returnAnimatedBottomNavigationBar(
activeIndex: activeIndex,
onTap: _onTap,
//other params
);
}
}