Advertisement
ZawXtut

flutter_SanDev002

Oct 20th, 2020 (edited)
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.11 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6.   @override
  7.   Widget build(BuildContext context) {
  8.     return MaterialApp(
  9.       title: 'Material App',
  10.       home: Scaffold(
  11.         appBar: AppBar(
  12.           title: Text('Material App Bar'),
  13.         ),
  14.         body: Row(
  15.           mainAxisAlignment: MainAxisAlignment.start,
  16.           mainAxisSize: MainAxisSize.max,
  17.           children: [
  18.             Column(
  19.               children: [
  20.                 Expanded(
  21.                   child: Container(
  22.                     margin: const EdgeInsets.all(5),
  23.                     width: 150,
  24.                     height: 100,
  25.                     color: Colors.amber,
  26.                   ),
  27.                 )
  28.               ],
  29.             ),
  30.             Column(
  31.               mainAxisSize: MainAxisSize.max,
  32.               mainAxisAlignment: MainAxisAlignment.start,
  33.               children: [
  34.                 Container(
  35.                   margin: const EdgeInsets.fromLTRB(8, 20, 0, 0),
  36.                   width: 200,
  37.                   height: 100,
  38.                   color: Colors.yellowAccent,
  39.                 ),
  40.                 Container(
  41.                   margin: const EdgeInsets.fromLTRB(8, 20, 0, 0),
  42.                   width: 200,
  43.                   height: 100,
  44.                   color: Colors.red,
  45.                 ),
  46.                 Container(
  47.                   margin: const EdgeInsets.fromLTRB(8, 20, 0, 0),
  48.                   width: 200,
  49.                   height: 100,
  50.                   color: Colors.greenAccent,
  51.                 ),
  52.                 Container(
  53.                   margin: const EdgeInsets.fromLTRB(8, 20, 0, 0),
  54.                   width: 200,
  55.                   height: 100,
  56.                   color: Colors.blue,
  57.                 ),
  58.                 Container(
  59.                   margin: const EdgeInsets.fromLTRB(8, 20, 0, 0),
  60.                   width: 200,
  61.                   height: 100,
  62.                   color: Colors.cyanAccent,
  63.                 )
  64.               ],
  65.             )
  66.           ],
  67.         ),
  68.       ),
  69.     );
  70.   }
  71. }
  72.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement