The indicator property of TabBar can be used to achieve the look.
In your case, try this-
DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
bottom: Container(
color: Colors.grey[200],
width: 200,
child:TabBar(
labelColor: Colors.red,
unselectedLabelColor: Colors.grey,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.white),
tabs: [
Tab(icon: Icon(Icons.directions_car)),
Tab(icon: Icon(Icons.directions_transit)),
],
),
),
),
);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…