Coder Social home page Coder Social logo

fluttertabbar's Introduction

FlutterTabBar

This is flutter tab bar complete example reposority.

For tab bar you need to follow these steps

  1. create DefaultTabController as root layout DefaultTabController has three argument First one in length, this is the count of tab, how many tab you want. Second is child, in this you need to use Scaffold class. Third is initialIndex.

  2. In Scaffold widget user app bar create AppBar, it has a argument called bottom give TabBar to bottom, and tab bar take List of Tab widget. create Tab same count as length in DefaultTabController.

  3. Now move to body argument of Scaffold Widget in body give TabBarView it also take List of widget you can give any type of widget, same count as length

For scrollable tab bar you just need to set isScrollable: true in TabBar

          new TabBar(
              isScrollable: true,
           )

You can use Icon with Text in Tab, In TabBar tabs List use icon argument for that

          new Tab(
                icon: new Icon(Icons.airplanemode_active),
                text: "First",
              ),

You can use custom Tab using child argument in tab

        new Tab(
                child: new Row(
                  children: <Widget>[
                    new Icon(Icons.airplanemode_active),
                    new SizedBox(
                      width: 5.0,
                    ),
                    new Text("First"),
                  ],
                ),
              )   
              

fluttertabbar's People

Contributors

deepak-gehlot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

binhbt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.