Advertisement
yudiwibisono

flutter_expanded

Apr 17th, 2022
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4. runApp(const MyApp());
  5. }
  6.  
  7. class MyApp extends StatelessWidget {
  8. const MyApp({Key? key}) : super(key: key);
  9.  
  10. @override
  11. Widget build(BuildContext context) {
  12. return MaterialApp(
  13. title: 'Hello App',
  14. home: Scaffold(
  15. appBar: AppBar(
  16. title: const Text('Hello'),
  17. ),
  18. body: Center(
  19. child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
  20. Container(
  21. decoration: BoxDecoration(border: Border.all()),
  22. padding: const EdgeInsets.all(14),
  23. child: Column(
  24. mainAxisAlignment: MainAxisAlignment.center,
  25. children: [
  26. Expanded(
  27. child: Container(
  28. decoration: BoxDecoration(border: Border.all()),
  29. padding: const EdgeInsets.all(14),
  30. child: Text('Hello World 1a')),
  31. ),
  32. Container(
  33. decoration: BoxDecoration(border: Border.all()),
  34. padding: const EdgeInsets.all(14),
  35. child: const Text('Hello World 1b')),
  36. ])),
  37. ]),
  38. ),
  39. ),
  40. );
  41. }
  42. }
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement