How can I customize the Tab indicator in the Flutter TabBar to achieve the target result below?
How can I do the following:
- Change unselected tabs as in the target picture
- Adjust the ripple borders to fit the content and have rounded edges.
This is my code
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
var categoryTabs = <Tab>[...];
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: categoryTabs.length,
child: Scaffold(
appBar: AppBar(
title: Text('My App'),
centerTitle: true,
bottom: PreferredSize(
preferredSize: Size(100, 70),
child: Column(
children: [
TabBar(
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.transparent,
labelColor: colorPrimaryDark,
isScrollable: true,
unselectedLabelColor: Colors.white,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.white,
),
tabs: categoryTabs,
),
SizedBox(height: 10)
],
),
),
),
body: SafeArea(...),
),
);
}
}


