Created
August 6, 2018 07:02
-
-
Save rohan20/63e7e494b6ba47073cad2acbdcc7be9f to your computer and use it in GitHub Desktop.
E-Commerce app using Flutter - Part 1: The User Interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_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