Created
September 4, 2019 09:11
-
-
Save adityapatnaik/4156805f5362146b5edc683929501d02 to your computer and use it in GitHub Desktop.
ListView Widget
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
ListView( | |
padding: const EdgeInsets.all(8.0), | |
scrollDirection: Axis.horizontal, // scrollDirection: Axis.vertical, implements vertical scrolling | |
children: <Widget>[ | |
Container( | |
height: MediaQuery.of(context).size.height/4, | |
width: MediaQuery.of(context).size.width/3, | |
color: Colors.amber[600], | |
child: const Center(child: Text('Entry A')), | |
), | |
Container( | |
height: 50, | |
width: MediaQuery.of(context).size.width/3, | |
color: Colors.amber[500], | |
child: const Center(child: Text('Entry B')), | |
), | |
Container( | |
height: 50, | |
width: MediaQuery.of(context).size.width/3, | |
color: Colors.amber[100], | |
child: const Center(child: Text('Entry C')), | |
), | |
Container( | |
height: 50, | |
width: MediaQuery.of(context).size.width/3, | |
color: Colors.amber[50], | |
child: const Center(child: Text('Entry D')), | |
), | |
], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment