The following animation shows the app’s behavior:

Define a new stateless widget

Your button widget needs to change its appearance over time.
Therefore, you need to implement your button with a custom
stateless widget.

Define a new stateless widget called DownloadButton.

Define the button’s possible visual states

The download button’s visual presentation is based on a
given download status. Define the possible states of
the download, and then update DownloadButton to accept
a DownloadStatus and a Duration for how long the button
should take to animate from one status to another.

Display the button shape

The download button changes its shape based on the download
status. The button displays a grey, rounded rectangle during
the notDownloaded and downloaded states.
The button displays a transparent circle during the
fetchingDownload and downloading states.

Based on the current DownloadStatus,
build an AnimatedContainer with a 
ShapeDecoration that displays a rounded
rectangle or a circle.