Setting up the project
In this chapter, we will learn how to use Flutter’s animation APIs to build an interactive Excuses application that allows us to randomly select an excuse to skip work.
When we have finished, the resulting application should look like Figure 7.1:
Figure 7.1 – A page of the Excuses app
In Figure 7.1, we see the same screen with two different texts that will animate in the following ways:
- An exit animation for the progress indicator when loading the excuses from the server
- An entry animation when the excuses finish loading from the server
- An exit animation for the old excuse loading the next excuse
- An entry animation when loading the next excuse
We will start with an example that already includes the Excuse view, in files named excuses_view.dart
. The application uses Equatable
, Dio
, and Provider
as dependencies for equality, HTTP requests, and dependency injection. It also includes the API...