Created
May 7, 2020 15:35
-
-
Save CoderJava/c142b9cd78b3fe88ff9556f2fa514234 to your computer and use it in GitHub Desktop.
Widget Container
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(App()); | |
| class App extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| home: HomePage(), | |
| ); | |
| } | |
| } | |
| class HomePage extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar(title: Text('Flutter Demo')), | |
| body: Container( | |
| width: 200.0, | |
| height: 200.0, | |
| margin: EdgeInsets.only( | |
| left: 24.0, | |
| top: 24.0, | |
| ), | |
| padding: EdgeInsets.only( | |
| left: 24.0, | |
| top: 24.0, | |
| ), | |
| decoration: BoxDecoration( | |
| color: Colors.teal, | |
| borderRadius: BorderRadius.only( | |
| topRight: Radius.circular(24.0), | |
| bottomLeft: Radius.circular(24.0), | |
| ), | |
| ), | |
| child: Text('HELLO WORLD'), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment