Last active
June 23, 2018 18:18
-
-
Save burhanrashid52/21350ed81e0029667f469f73fb957582 to your computer and use it in GitHub Desktop.
This file contains 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(new MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => new _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
home: new Scaffold( | |
appBar: new AppBar( | |
title: new Text("LinearLayout Example"), | |
), | |
body: new Container( | |
color: Colors.yellowAccent, | |
child: new Container( | |
child: new Row( | |
children: [ | |
new Expanded( | |
child: new Container( | |
child: new Icon( | |
Icons.access_time, | |
size: 50.0, | |
), | |
color: Colors.red, | |
), | |
flex: 2, | |
), | |
new Expanded( | |
child: new Container( | |
child: new Icon( | |
Icons.pie_chart, | |
size: 100.0, | |
), | |
color: Colors.blue, | |
), | |
flex: 4, | |
), | |
new Expanded( | |
child: new Container( | |
child: new Icon( | |
Icons.email, | |
size: 50.0, | |
), | |
color: Colors.green, | |
), | |
flex: 6, | |
), | |
], | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment