### Starting Point To Every App
First part of every Flutter application is including all of the packages required.
```Dart
import 'package:flutter/material.dart';
```
1. Starts with the function `void Main()`. Entry point of the application
```Dart
void main() {
}
```
2. Main function invokes `runApp` function. It takes in one widget, known as the **root widget**.
```Dart
runApp();
```
3. `MaterialApp` is the first widget, and is the true entry point for all designing and adding widgets.
```Dart
runApp(
const MaterialApp()
);
```
4. `MaterialApp` has one parameter the `home`. In this example we will be using the **Scaffold Widget** as our home parameter which provides basic structure to our app.
```Dart
const MaterialApp(
home: Scaffold()
)
```
5. Putting it all together:
```Dart
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
home: Scaffold()
)
);
}
```
### Text Widgets
Displays text within an application, calling the constructor `Text()`.
In the Most basic form:
```Dart
Text('Hello, world!')
```
To place a text widget into the application, we will place it inside our `Scaffold()` constructor in the `body` element.
```Dart
Scaffold(body: Text('Hello!'))
```
All Together:
```Dart
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
home: Scaffold(body: Text('Hello World!'))
)
);
}
```
#### Styling Text
The `style` parameter in the `Text` widget allows us to style our text elements.
Flutter provides a class called `TextStyle` that holds style information for our text such as size and color that can be stored in a variable.
You can **declare variables** between `main` and `runApp`.
```Dart
void main() {
const bigRedStyle = TextStyle(color:Colors.red, fontSize: 24);
runApp(...
```
The `color` and `fontSize` parameter here used to set the color and the size of the text.
All Together:
```Dart
import 'package:flutter/material.dart';
void main() {
const bigBlueStyle = TextStyle(color: Colors.blue, fontSize: 36);
runApp(
const MaterialApp(
home: Scaffold(
body: Text('Codecademy: Flutter Edition', style: bigBlueStyle)
)
)
);
}
```