How to add underline to unselected tabs in Flutter?

306

You can use tabs to achieve this

Scaffold(
          appBar: AppBar(
            bottom: TabBar(
              tabs: [
                Tab(text:"About"), // you can specify pages here if you want
                Tab(text:"Reg"),
                Tab(text:"Services"),
               
              ],
            ),
            title: Text('Tabs Demo'),
          ),
          body: TabBarView(
            children: [
              Text("1"),
              Text("2"),
              Text("3"),
         
            ],
          ),
        ),
Share:
306
Qasim Ali
Author by

Qasim Ali

Hi, Hope You are fine. I am Qasim Ali, i just completed my Graduation in Computer Science in 2019. I am Working as a Flutter Developer Since. I am at learning stage and Loves to develop apps using Flutter. It's a very beautiful tool to learn and develop new Apps. Thanks

Updated on December 22, 2022

Comments

  • Qasim Ali
    Qasim Ali over 1 year

    How to add underline to unselected tabs, like this: enter image description here

    you can see it is gray colour for unselected tabs, and blue for selected. I want the Undelined color of Unselected Tabs according to my app color.

  • Qasim Ali
    Qasim Ali almost 4 years
    basically i want to change the colour from silver to other one like red. is it possible or not?
  • Mohamed Inshaf
    Mohamed Inshaf almost 4 years
    indicatorColor : your desired color
  • Qasim Ali
    Qasim Ali almost 4 years
    if i use indicatorColor : Colors.red, then it Changes the Selected Tab color, i want to change the color of Others.