Advertisement
rajath_pai

ninja12 Column

Jul 30th, 2021
859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.22 KB | None | 0 0
  1. //Column
  2.  
  3. import 'package:flutter/material.dart';
  4.  
  5. void main() => runApp(MaterialApp(
  6.       home: Home(),
  7.     ));
  8.  
  9. class Home extends StatelessWidget {
  10.   @override
  11.   Widget build(BuildContext context) {
  12.     return Scaffold(
  13.       appBar: AppBar(
  14.         title: Text(
  15.           'App bar',
  16.           style: TextStyle(color: Colors.white),
  17.         ),
  18.         centerTitle: true,
  19.         backgroundColor: Colors.red,
  20.       ),
  21.       body: Column(
  22.         mainAxisAlignment : MainAxisAlignment.end,
  23.         crossAxisAlignment : CrossAxisAlignment.end,
  24.         children :  <Widget>[
  25.           Container(
  26.             padding : EdgeInsets.all(20.0),
  27.             color : Colors.blue,
  28.             child : Text('one'),
  29.           ),
  30.           Container(
  31.             padding : EdgeInsets.all(30.0),
  32.             color : Colors.green,
  33.             child : Text('two'),
  34.           ),
  35.           Container(
  36.             padding : EdgeInsets.all(40.0),
  37.             color : Colors.orange,
  38.             child : Text('three'),
  39.           ),
  40.         ],
  41.       ),
  42.       floatingActionButton: FloatingActionButton(
  43.         child: Text('click me'),
  44.         onPressed: null,
  45.         backgroundColor: Colors.red,
  46.       ),
  47.     );
  48.   }
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement