Skip to content

Instantly share code, notes, and snippets.

@rohan20
Created August 6, 2018 07:03
Show Gist options
  • Select an option

  • Save rohan20/39131f29b0e682b84519570903027c68 to your computer and use it in GitHub Desktop.

Select an option

Save rohan20/39131f29b0e682b84519570903027c68 to your computer and use it in GitHub Desktop.
E-Commerce app using Flutter - Part 1: The User Interface
_buildDetailsAndMaterialWidgets() {
TabController tabController = new TabController(length: 2, vsync: this);
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
TabBar(
controller: tabController,
tabs: <Widget>[
Tab(
child: Text(
"DETAILS",
style: TextStyle(
color: Colors.black,
),
),
),
Tab(
child: Text(
"MATERIAL & CARE",
style: TextStyle(
color: Colors.black,
),
),
),
],
),
Container(
padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 6.0),
height: 40.0,
child: TabBarView(
controller: tabController,
children: <Widget>[
Text(
"76% acrylic, 19% polyster, 5% metallic yarn Hand-wash cold",
style: TextStyle(
color: Colors.black,
),
),
Text(
"86% acrylic, 9% polyster, 1% metallic yarn Hand-wash cold",
style: TextStyle(
color: Colors.black,
),
)
],
),
),
],
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment