Created
September 19, 2020 08:40
-
-
Save tklee1975/b385d447337a28ac776a6b7c305ae112 to your computer and use it in GitHub Desktop.
A very simple flutter widget!
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/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return CupertinoApp( | |
home: Container( | |
color: Colors.amber, | |
child: Center( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
crossAxisAlignment: CrossAxisAlignment.center, | |
children: <Widget>[ | |
Text( | |
"What's Flutter?", | |
style: TextStyle(fontSize: 30), | |
), | |
Padding( | |
padding: const EdgeInsets.all(30.0), | |
child: Text( | |
"Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.", | |
style: TextStyle(fontSize: 20), | |
textAlign: TextAlign.center, | |
), | |
), | |
], | |
)), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment