Skip to content

Instantly share code, notes, and snippets.

@nnamdei
Created April 22, 2020 09:05
Show Gist options
  • Save nnamdei/5bfcc85c64d47556b252d5c08146b47d to your computer and use it in GitHub Desktop.
Save nnamdei/5bfcc85c64d47556b252d5c08146b47d to your computer and use it in GitHub Desktop.
custom_tabview_flutter
Container(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
DefaultTabController(
length: 2,
initialIndex: 0,
child: Expanded(
child: Column(
children: [
Material(
color: Colors.grey,
child: TabBar(
indicatorColor:
Colors.yellow,
labelColor: Colors.blue,
unselectedLabelColor:
Colors.black,
tabs: [
Tab(
child: Text(
'Text',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
),
)),
Tab(
child: Text(
'Text',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
),
))
])),
Expanded(
child: TabBarView(
children: [
Container(
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: <Widget>[
],
),
),
Container(
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: <Widget>[
],
),
),
],
),
)
],
),
)),
],
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment