Creating Your First Flutter App
One of the greatest Flutter features is that it makes app development easy, or at least as easy as is possible today. It provides several pre-built components that can be easily customized to fit your needs.
One of the key elements of a Flutter project is the lib
folder, which contains the main Dart code for your app. This is where you will be writing most of your code, including both layout and logic. Flutter projects also contain a file called pubspec.yaml
, where you’ll find the project’s dependencies and other important configuration information.
In this chapter, you will see how to create the default “Hello World” app, and understand the structure of a Flutter project. By understanding a Flutter project’s structure, you will be able to easily navigate and understand the code for your own apps.
In this chapter, you will learn:
- How to create a Flutter app
- How Flutter projects are structured
- How to run a Flutter app
- Hot reload—refresh your app without recompiling
- How to create a simple unit test