2
Creating a Hello World App
WHAT YOU WILL LEARN IN THIS CHAPTER
- How to create a new Flutter mobile app
- How to refresh the running app with hot reload
- How to style the app with themes
- When to use a stateless or stateful widget
- How to add external packages
A great way to learn a new development language is to write a basic app. In programming, Hello World is the most basic program to write. It simply displays the words Hello World on the screen. In this chapter, you'll learn the main steps of how to develop this basic program as a Flutter app. Do not worry about understanding the code yet; I'll walk you through it step‐by‐step later in this book.
Writing this minimal example helps you learn the basic structure of a Flutter app, how to run the app on the iOS simulator and the Android emulator, and how to make changes to the code.
SETTING UP THE PROJECT
The initial project setup for each app is the same. I'm using Android Studio to create the sample apps...