Created
July 11, 2019 07:35
-
-
Save abhinav4848/613d0631e8eaf02a70887773acc4dab8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
backgroundColor: Colors.black, | |
body: SafeArea( | |
child: Row( | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
children: <Widget>[ | |
Expanded( | |
child: Container( | |
height: 100.0, | |
width: 100.0, | |
color: Colors.red, | |
child: Text('Container 1'), | |
), | |
), | |
Expanded( | |
flex: 2, | |
child: Container( | |
height: 100.0, | |
color: Colors.teal, | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
Container( | |
height: 100.0, | |
width: 100.0, | |
color: Colors.yellow, | |
), | |
Container( | |
height: 100.0, | |
width: 100.0, | |
color: Colors.lightGreen, | |
), | |
], | |
), | |
), | |
), | |
Expanded( | |
child: Container( | |
width: 100.0, | |
height: 100.0, | |
color: Colors.blue, | |
child: Text('Container 3'), | |
), | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment