Skip to content

Instantly share code, notes, and snippets.

@termosa
Last active May 22, 2019 06:12
Show Gist options
  • Select an option

  • Save termosa/c1bdc9f5bb2a7bbc3a77ca8cd013075d to your computer and use it in GitHub Desktop.

Select an option

Save termosa/c1bdc9f5bb2a7bbc3a77ca8cd013075d to your computer and use it in GitHub Desktop.
[An Introduction to Flutter: The Interface] Wrap example
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