Skip to content

Instantly share code, notes, and snippets.

@rohan20
Created August 6, 2018 07:02
Show Gist options
  • Save rohan20/63e7e494b6ba47073cad2acbdcc7be9f to your computer and use it in GitHub Desktop.
Save rohan20/63e7e494b6ba47073cad2acbdcc7be9f to your computer and use it in GitHub Desktop.
E-Commerce app using Flutter - Part 1: The User Interface
_buildProductImagesWidgets() {
TabController imagesController = TabController(length: 3, vsync: this);
return Padding(
padding: const EdgeInsets.all(16.0),
child: Container(
height: 250.0,
child: Center(
child: DefaultTabController(
length: 3,
child: Stack(
children: <Widget>[
TabBarView(
controller: imagesController,
children: <Widget>[
Image.network("<image_url>"),
Image.network("<image_url>"),
Image.network("<image_url>"),
],
),
Container(
alignment: FractionalOffset(0.5, 0.95),
child: TabPageSelector(
controller: imagesController,
selectedColor: Colors.grey,
color: Colors.white,
),
)
],
),
),
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment