Define a StatefulWidget.

Display a button that toggles the visibility.

Fade the box in and out.

1. Create a box to fade in and out

First, create something to fade in and out. For this example,
draw a green box on screen.

2. Define a StatefulWidget

Now that you have a green box to animate,
you need a way to know whether the box should be visible.
To accomplish this, use a StatefulWidget.

A StatefulWidget is a class that creates a State object.
The State object holds some data about the app and provides a way to
update that data. When updating the data,
you can also ask Flutter to rebuild the UI with those changes.

In this case, you have one piece of data:
a boolean representing whether the button is visible.