Last active
February 20, 2021 20:12
-
-
Save mhmadip/5667ff3d23a713eb8f02a3bc27d318f9 to your computer and use it in GitHub Desktop.
Rectangle App
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(MaterialApp( | |
title: "Hello Rectangle", | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text("Rectangle App"), | |
), | |
body: RectangleApp(), | |
), | |
)); | |
class RectangleApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Center( | |
child: Container( | |
height: 400.0, | |
width: 300.0, | |
color: Colors.greenAccent, | |
child: Center( | |
child: Text( | |
"Hello Rectangle", | |
textAlign: TextAlign.center, | |
style: TextStyle( | |
color: Colors.purple, | |
fontSize: 30, | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment