Advertisement
rajath_pai

ninja12 Row in Column

Jul 30th, 2021
952
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.36 KB | None | 0 0
  1. //Row in 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.start,
  24.         children :  <Widget>[
  25.           Row(
  26.             children : <Widget>[
  27.               Text('Hello'),
  28.               Text('World'),
  29.             ],
  30.           ),
  31.           Container(
  32.             padding : EdgeInsets.all(20.0),
  33.             color : Colors.blue,
  34.             child : Text('one'),
  35.           ),
  36.           Container(
  37.             padding : EdgeInsets.all(30.0),
  38.             color : Colors.green,
  39.             child : Text('two'),
  40.           ),
  41.           Container(
  42.             padding : EdgeInsets.all(40.0),
  43.             color : Colors.orange,
  44.             child : Text('three'),
  45.           ),
  46.         ],
  47.       ),
  48.       floatingActionButton: FloatingActionButton(
  49.         child: Text('click me'),
  50.         onPressed: null,
  51.         backgroundColor: Colors.red,
  52.       ),
  53.     );
  54.   }
  55. }
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement