Extra space between Tabs in flutter created by default space in Tabs. It’s easy to remove. Look at the code below
TabBar(
controller: _tabController,
indicator: BoxDecoration(
color: kPrimary,
borderRadius: BorderRadius.circular(25),
),
labelPadding: EdgeInsets.zero,
labelColor: Colors.white,
labelStyle: appStyle(12, kLightWhite, FontWeight.normal),
unselectedLabelColor: Colors.grey.withOpacity(0.7),
tabs: <Widget>[
Tab(
child: SizedBox(
width:MediaQuery.of(context).size.width/2,
//margin: EdgeInsets.only(left: 20, right: 20),
height: 25,
child: const Center(child: Text("Menu")),
),
),
Tab(
child: SizedBox(
width:MediaQuery.of(context).size.width/2,
height: 25,
child: const Center(child: Text("Explore")),
),
)
],
)
The above code has labelPadding: EdgeInsets.zero which removes extra space or padding between tabs in Flutter
You see the explore tab is nice
Thanks for post, brother!