Last active
November 9, 2018 19:41
-
-
Save iamchathu/06640ebcf562d2fd4481438fd4546be4 to your computer and use it in GitHub Desktop.
Hello Flutter
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( | |
debugShowCheckedModeBanner: false, | |
title: 'Hello DevFest', | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text('Hello DevFest Colombo'), | |
), | |
body: HelloRectangle(), | |
), | |
), | |
); | |
} | |
class HelloRectangle extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Center( | |
child: Container( | |
color: Colors.greenAccent, | |
height: 400.0, | |
width: 300.0, | |
child: Center( | |
child: Text( | |
'Hello from Flutter!', | |
style: TextStyle(fontSize: 40.0), | |
textAlign: TextAlign.center, | |
), | |
), | |
), | |
); | |
} | |
} |
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'; | |
class HelloDevFest extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
color: Colors.greenAccent, | |
height: 300, | |
width: 400, | |
); | |
} | |
} | |
void main() { | |
runApp(MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text('Google DevFest'), | |
), | |
body: HelloDevFest()))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment