Advertisement
ZawXtut

flutter_SanDev001

Oct 20th, 2020 (edited)
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.12 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: Container(
  15.           child: Column(
  16.             mainAxisSize: MainAxisSize.max,
  17.             mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  18.             children: [
  19.               Row(
  20.                 mainAxisAlignment: MainAxisAlignment.spaceAround,
  21.                 children: [
  22.                   Container(
  23.                     color: Colors.amber,
  24.                     width: 150,
  25.                     height: 150,
  26.                     child: FlutterLogo(size: 100),
  27.                   ),
  28.                   Container(
  29.                     color: Colors.greenAccent,
  30.                     width: 150,
  31.                     height: 150,
  32.                     child: FlutterLogo(size: 100),
  33.                   ),
  34.                 ],
  35.               ),
  36.               Row(
  37.                 children: [
  38.                   Expanded(
  39.                     child: Container(
  40.                       color: Colors.blueGrey,
  41.                       width: 100,
  42.                       height: 150,
  43.                       margin: const EdgeInsets.all(10),
  44.                     ),
  45.                   ),
  46.                 ],
  47.               ),
  48.               Row(
  49.                 mainAxisSize: MainAxisSize.max,
  50.                 mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  51.                 children: [
  52.                   Container(
  53.                     color: Colors.red,
  54.                     width: 150,
  55.                     height: 150,
  56.                     child: FlutterLogo(size: 100),
  57.                   ),
  58.                   Container(
  59.                     color: Colors.blue,
  60.                     width: 150,
  61.                     height: 150,
  62.                     child: FlutterLogo(size: 100),
  63.                   ),
  64.                 ],
  65.               )
  66.             ],
  67.           ),
  68.         ),
  69.       ),
  70.     );
  71.   }
  72. }
  73.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement