flutterdartshadowtabbardecoration

How to remove elevation or box shadow in tab bar in flutter?


I am using tab bar in one of my screen. As you can see when I scroll there comes the elevation under the tab bar. I tried multiple ways to remove that, but can't. Do you guys have any idea on this?

This is the code:

TabBar(
  indicatorSize: TabBarIndicatorSize.tab,
  isScrollable: false,
  controller: _tabController,
  indicatorPadding: EdgeInsets.only(left: 16.w, right: 16.w),
  tabs:[
    tab1(),
    tab2(),
    tab3(),
  ],
)

Screen shot of the screen


Solution

  • I am assuming that it is not TabBar elevation. It is a shadow of AppBar as you are putting(in my opinion) TabBar inside AppBar. So do like this with your AppBar:

    appBar: AppBar(
      ....,
      elevation: 0,
    ),