I want to change my current tabBar indicator (blue line) to the desire UI (rounded corner only at the top) – image attached. I tried a lot but unable to do so. Is it possible to achieve it and can anyone guide me how I can achieve this result. Following is my code:
TabBar(
controller: _controller,
isScrollable: true,
labelColor: Theme.of(context).colorScheme.secondaryContainer,
unselectedLabelColor: Colors.black,
indicatorColor: Theme.of(context).colorScheme.secondaryContainer,
indicatorSize: TabBarIndicatorSize.label,
indicatorWeight: 5.0,)
2
Answers
Try adding the
indicator
parameter:Or you can place the tabs inside a Container widget that has a bottom borderside.
This should work
Use plugin:
tab_indicator_styler: ^2.0.0
Refer Plugin HereOutput