Shifting TabBar in Flutter

You are currently viewing Shifting TabBar in Flutter
Shifting TabBar

Shifting tabbar in flutter is beautiful tab bar for Flutter framework. A custom tab bar widget.  TabBar is material design class that used to displays horizontal row of tabs.
Inspiration of this project ui is from Rally project.

Preview : Let’s see how it will look when you will be done with this.

See also  Flutter Music App Made with Provider and BLoC Pattern

Getting Started

This image has an empty alt attribute; its file name is shift_tab_bar.gif

Add the package to pubspec.yaml

Import the package

dependencies:  
shifting_tabbar: ^0.3.1
import 'package:shifting_tabbar/shifting_tabbar.dart';

Basic Usage

This widget is programmed to work with TabController. You just need to install and import it to your code and use it just like TabBar.

Don’t forget to use DefaultTabController as an ancestor widget if you don’t specify controller manually!

new ShiftingTabBar(
     tabs: [
         ShiftingTab(
             icon: Icon(Icons.directions_bike),
             text: "Test 1",
         ),
         ShiftingTab(
             icon: Icon(Icons.directions_car),
             text: "Test 2"
         ),
         ShiftingTab(
             icon: Icon(Icons.directions_transit),
             text: "Test 3"
         ),
     ],
 )

Credits: 
This is developed by mahdizakiadeh. 
Download this project from the below link.
https://github.com/mahdizakizadeh/shifting_tabbar/archive/master.zip 
You can visit original source page below the link.
 https://github.com/mahdizakizadeh/shifting_tabbar

Spread the love

Leave a Reply