wildanfuady

Expanded Example

Oct 12th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. class ExpandedExample extends StatelessWidget {
  4. @override
  5. Widget build(BuildContext context) {
  6. return Scaffold(
  7. appBar: AppBar(
  8. title: Text('Expanded Sample'),
  9. ),
  10. body: Center(
  11. child: Row(
  12. children: <Widget>[
  13. Expanded(
  14. flex: 2,
  15. child: Container(
  16. color: Colors.amber,
  17. height: 100,
  18. ),
  19. ),
  20. Container(
  21. color: Colors.blue,
  22. height: 100,
  23. width: 50,
  24. ),
  25. Expanded(
  26. flex: 1,
  27. child: Container(
  28. color: Colors.amber,
  29. height: 100,
  30. ),
  31. ),
  32. ],
  33. ),
  34. ),
  35. );
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment