Guest User

Untitled

a guest
Dec 4th, 2020
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 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: Container(color: Colors.red.shade400),
  21. ),
  22. Expanded(
  23. child: Column(
  24. children: [
  25. Container(color: Colors.yellow.shade400, height: 100),
  26. Flexible(
  27. flex: 1,
  28. child: Container(color: Colors.green.shade400),
  29. ),
  30. Container(color: Colors.blue.shade400, height: 100),
  31. ],
  32. ),
  33. ),
  34. ],
  35. ),
  36. ),
  37. ),
  38. );
  39. }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment