The image below is an example of when a tab is long pressed but it shows an undesirable rectangle-shaped grey ripple effect.
long pressed active tab and long pressed inactive tab
How do I change its shape so that it has the same shape as the tab?
Here is my current code:
build method:
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 2,
child: Scaffold(
body: CustomScrollView(
slivers: [
SliverAppBar(
title: Text('Task n\' Note'),
pinned: true,
floating: true,
foregroundColor: Colors.black,
backgroundColor: Colors.white,
bottom: TabBar(
unselectedLabelColor: Colors.blueAccent,
indicatorSize: TabBarIndicatorSize.label,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(25.0),
color: Colors.blueAccent),
tabs: [
_buildTab('Tasks'),
_buildTab('Notes'),
],
),
)
],
),
),
);
_buildTab method:
Widget _buildTab(String title) {
return Tab(
child: Align(
alignment: Alignment.center,
child: Text(title),
),
);
}
