попробуйте неплохо
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 2,
child: SafeArea(
child: Scaffold(
appBar: PreferredSize(
preferredSize: Size(MediaQuery.of(context).size.width, 500),
child: Container(
color: Colors.white,
padding: const EdgeInsets.all(16),
child: Row(
children: <Widget>[
Icon(Icons.arrow_back_ios,size: 30,),
SizedBox(
width: 16,
),
Expanded(
child: TabBar(
indicatorColor: Colors.transparent,
indicatorSize: TabBarIndicatorSize.tab,
unselectedLabelColor: Colors.grey[400],
// Using BoxDecoration there is PADDING issue in Tabs
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.blueAccent,
boxShadow: [
BoxShadow(
color: Colors.deepPurple
.withOpacity(0.3)
.withBlue(150),
blurRadius: 25,
offset:
Offset(0, 20), // changes position of shadow
),
],
),
tabs: <Tab>[
Tab(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.create,
size: 20,
),
Text(' ' + 'Form'),
],
),
),
Tab(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.remove_red_eye,
size: 20,
),
Text(' ' + 'Preview'),
],
),
),
],
),
),
],
),
),
),
body: Container()),
),
);
}