Summary
In this chapter, you’ve seen how to create a Flutter app and your first unit test. You’ve seen how directories are organized in a Flutter project: in particular, the lib
directory contains the main.dart
file for your app, which is the entry point for your app. Its main()
method is executed when you run the app.
The pubspec.yaml
file is the Flutter project’s main configuration file. Flutter creates specific target operating system directories in your project, like android
and ios
. You’ve seen how Flutter needs those to compile to different targets, with the same code base.
You’ve learned how to run the app from the Terminal by using flutter run
and from an IDE by running the app from your editor’s interface.
You’ve seen the benefits of writing unit tests, which may help you write reliable code that works as expected, and learned how to import the flutter_test
package.
You’ve seen the test()
, expect()
, and group()
methods, which are the main building blocks for creating unit tests in Flutter.
In the next chapter, you’ll see an introduction to the Dart language.