Advertisement
Guest User

Untitled

a guest
Dec 4th, 2020
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4. runApp(MyApp());
  5. }
  6.  
  7. class MyApp extends StatelessWidget {
  8. @override
  9. Widget build(BuildContext context) {
  10. return MaterialApp(
  11. debugShowCheckedModeBanner: false,
  12. home: Builder(
  13. builder: (context) => Scaffold(
  14. body: Column(
  15. children: [
  16. ConstrainedBox(
  17. constraints: BoxConstraints(
  18. maxHeight: MediaQuery.of(context).size.width,
  19. ),
  20. child: Expanded(child: Container(color: Colors.red.shade400)),
  21. ),
  22. Container(color: Colors.yellow.shade400, height: 100),
  23. Flexible(
  24. child: Container(color: Colors.green.shade400),
  25. ),
  26. Container(color: Colors.blue.shade400, height: 100),
  27. ],
  28. ),
  29. ),
  30. ),
  31. );
  32. }
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement