Last active
April 23, 2020 18:29
-
-
Save iamriya/b2799ab3bc8e2dfa5d75abcf3b597c72 to your computer and use it in GitHub Desktop.
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(MaterialApp( | |
title: 'Flutter app demo', | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text('Demo App'), //This text is displayed in the AppBar | |
), //AppBar | |
body: Container( | |
child: Column( | |
//Column widget places its children vertically aligned with one another | |
children: <Widget>[ | |
Row( | |
//Row widget places its children horizontally aligned with one another | |
children: <Widget>[ | |
Icon( | |
Icons.star, | |
size: 100, //size property to set the size of the icon | |
color: Colors.yellow, //color property to set the color of the icon | |
), //Icon | |
Text( | |
'Hello', | |
style: TextStyle(fontSize: 100), //TextStyle widget styles the Text widget | |
), //Text | |
], | |
), | |
Row( | |
children: <Widget>[ | |
//Try adding Widgets as you intend | |
], | |
), //Row | |
], | |
), //Column | |
), //Container | |
), //Scaffold | |
)); //MaterialApp | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment