Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kishansinhparmar
Last active April 28, 2018 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kishansinhparmar/64381387bfcd2980fc0039b1bfecaace to your computer and use it in GitHub Desktop.
Save kishansinhparmar/64381387bfcd2980fc0039b1bfecaace to your computer and use it in GitHub Desktop.
Flutter Hello World!
//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