Last active
May 22, 2019 06:12
-
-
Save termosa/c1bdc9f5bb2a7bbc3a77ca8cd013075d to your computer and use it in GitHub Desktop.
[An Introduction to Flutter: The Interface] Wrap example
This file contains hidden or 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
| class WrapExample extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Wrap( | |
| direction: Axis.vertical, | |
| children: [ | |
| Item(), | |
| Item(), | |
| Item(), | |
| ], | |
| ); | |
| } | |
| } | |
| class Item extends StatelessWidget { | |
| Item({this.color}); | |
| final Color color; | |
| @override | |
| Widget build(BuildContext context) { | |
| return Container( | |
| margin: EdgeInsets.all(5), | |
| color: Color(0xFFFF00FF), | |
| width: 100, | |
| height: 100, | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment