Last active
April 28, 2018 07:13
-
-
Save kishansinhparmar/64381387bfcd2980fc0039b1bfecaace to your computer and use it in GitHub Desktop.
Flutter Hello World!
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
//material package to use material widgets | |
import 'package:flutter/material.dart'; | |
//Main method to run app | |
void main() => runApp(new MyApp()); | |
//MyApp class | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
//Sinle container has text child | |
return new Container( | |
alignment: FractionalOffset.center, | |
margin: const EdgeInsets.all(16.0), | |
child: new Text( | |
"Hello World!", | |
textDirection: TextDirection.ltr, | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment