Skip to content

Instantly share code, notes, and snippets.

@iamriya
Last active April 23, 2020 18:29
Show Gist options
  • Save iamriya/b2799ab3bc8e2dfa5d75abcf3b597c72 to your computer and use it in GitHub Desktop.
Save iamriya/b2799ab3bc8e2dfa5d75abcf3b597c72 to your computer and use it in GitHub Desktop.
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