I want to create a TabBar
that add IconButton
to start of the TabBar
without having any TabIndicator
which is just used as action.
const TabBar(
isScrollable: true,
tabs: [
Tooltip(
message: "Customize your interest",
child: Icon(Icons.add),
),
Tooltip(
message: "For you",
child: Tab(text: "For you"),
),
Tooltip(
message: "Following",
child: Tab(text: "Following"),
),
],
)
The add button still has TabIndicator
when clicked and I have to add one extra Page to TabBarView
I don’t need a page for the add button, just wanna use it as an action button
2
Answers
Thanks to Samgi, I was able to think clearly. I used
SingleScrollChild
to make bothTabBar
andIconButton
scroll together. This is the code belowYou need to wrap CustomTabBar with a DefaultTabController