Created
August 8, 2018 03:15
-
-
Save burhanrashid52/54f65c019e50ddbb56d75226a6026dd5 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("FrameLayout"), | |
), | |
body: new Container( | |
color: Colors.tealAccent, | |
child: new Stack( | |
children: [ | |
Align( | |
child: Container( | |
height: 200.0, | |
width: 200.0, | |
color: Colors.red, | |
), | |
alignment: AlignmentDirectional.topStart, | |
), | |
Align( | |
child: Container( | |
height: 150.0, | |
width: 150.0, | |
color: Colors.blue, | |
), | |
alignment: AlignmentDirectional.topEnd, | |
), | |
Align( | |
child: Container( | |
height: 100.0, | |
width: 100.0, | |
color: Colors.green, | |
), | |
alignment: AlignmentDirectional.bottomStart, | |
), | |
Align( | |
child: Container( | |
height: 50.0, | |
width: 50.0, | |
color: Colors.yellow, | |
), | |
alignment: AlignmentDirectional.bottomEnd, | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment