enter image description here
DefaultTabController(
length: 3,
initialIndex: 1,
child: Scaffold(
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
backgroundColor: Colors.grey[900],
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.offline_bolt),
title: Text('Shorts'),
),
BottomNavigationBarItem(
icon: Icon(Icons.graphic_eq),
title: Text('Activity'),
),
BottomNavigationBarItem(
icon: Icon(Icons.cloud_upload),
title: Text('Upload'),
),
BottomNavigationBarItem(
icon: Icon(Icons.email),
title: Text('Messages'),
),
BottomNavigationBarItem(
icon: Icon(Icons.menu),
title: Text('More'),
),
],
currentIndex: _selectedIndex,
selectedItemColor: Colors.white,
unselectedItemColor: Colors.grey,
onTap: _onItemTapped,
),
body: NestedScrollView(
controller: _scrollViewController,
headerSliverBuilder: (BuildContext context, bool boxIsScrolled) {
return <Widget>[
SliverAppBar(
centerTitle: true,
leading: IconButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => HeadingCircle()));
},
icon: Icon(Icons.account_circle),
),
actions: [
IconButton(
color: Colors.grey,
icon: Icon(Icons.search),
onPressed: () {},
),
],
backgroundColor: Colors.grey[900],
title: Text(
'dribbble',
style: TextStyle(fontFamily: 'Pacifico'),
),
pinned: true,
floating: true,
forceElevated: boxIsScrolled,
bottom: TabBar(
tabs: <Widget>[
Tab(
text: "Following",
),
Tab(
text: "Popular",
),
Tab(
text: "Recent",
)
],
controller: _tabController,
),
),
];
},
body: TabBarView(
children: <Widget>[
Tab(
child: Text('1'),
),
Tab(
child: Text('2'),
),
Tab(
child: Text('3'),
),
],
controller: _tabController,
),
),
),
);