This chapter covers
- Dissecting Flutter basics via the Increment app
- Flutter widget classes
- BuildContext, the widget tree, and the element tree
- Flutter development environment and tips
I imagine, because you’re reading this, that you’re at least intrigued by Flutter. By the end of this chapter, I hope you’ll be excited about it. In this chapter, I’ll walk you through the ins and outs of Flutter. I’ll show you how to use it and how it works under the hood. The goal of this chapter is to build a foundation. This is the plan for doing so:
- Take an in-depth look at the counter app, which is the app that’s generated when you start a new Flutter project with the CLI.
- Make the counter app more robust by adding some basic widgets.
- Spend some time talking about BuildContext, the widget tree, and elements. Understanding how this works is 90% of debugging Flutter errors.
- Learn tricks and tools that the Flutter team has built in to the SDK that makes development enjoyable.
Note
If Flutter isn’t installed on your machine yet, you can find installation instructions in the appendix. If you have trouble setting it up, look for additional help in the docs at https://flutter.dev/get-started.