Advertisement
wildanfuady

Container Example

Oct 12th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. class ContainerExample extends StatelessWidget {
  4. @override
  5. Widget build(BuildContext context) {
  6. return Container(
  7. color: Colors.green,
  8. child: Column(
  9. mainAxisAlignment: MainAxisAlignment.center,
  10. crossAxisAlignment: CrossAxisAlignment.center,
  11. children: <Widget>[
  12. Container(
  13. width: 100.0,
  14. height: 100.0,
  15. color: Colors.yellow,
  16. ),
  17. Container(
  18. width: 100.0,
  19. height: 100.0,
  20. color: Colors.grey,
  21. ),
  22. Row(
  23. mainAxisAlignment: MainAxisAlignment.center,
  24. children: <Widget>[
  25. Container(
  26. width: 100.0,
  27. height: 100.0,
  28. color: Colors.blueGrey,
  29. ),
  30. Container(
  31. width: 100.0,
  32. height: 100.0,
  33. color: Colors.blue,
  34. ),
  35. Container(
  36. width: 100.0,
  37. height: 100.0,
  38. color: Colors.yellow,
  39. ),
  40. ],
  41. )
  42. ],
  43. ),
  44. );
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement