Motion TabBar in Flutter

You are currently viewing Motion TabBar in Flutter

A flutter project which is having beautiful animated motion tabbar in flutter for you. With the help of this project you can add beautiful tab bar in your app.

Preview : From below Gif you can check its animation.

 

Getting Started

Add the plugin:

dependencies: motion_tab_bar: ^0.1.5

Basic Usage

Adding the widget

 MotionTabController _tabController;
@override
void initState() {
  super.initState();
  _tabController = new MotionTabController(initialIndex:1,vsync: this);
}

@override
void dispose() {
  super.dispose();
  _tabController.dispose();
}

bottomNavigationBar: MotionTabBar(
        labels: [
          "Account","Home","Dashboard"
        ],
        initialSelectedTab: "Home",
        tabIconColor: Colors.green,
        tabSelectedColor: Colors.red,
        onTabItemSelected: (int value){
             print(value);
             setState(() {
                _tabController.index = value;
             });
        },
        icons: [
          Icons.account_box,Icons.home,Icons.menu
        ],
        textStyle: TextStyle(color: Colors.red),
),

Credits:
This is developed by therezacuet
Download this project from the below link.
https://github.com/therezacuet/Motion-Tab-Bar/archive/refs/heads/master.zip
You can visit original source page from the below link:
https://github.com/therezacuet/Motion-Tab-Bar

Spread the love
See also  Shifting TabBar in Flutter

Leave a Reply