The difference between stateless and stateful widgets.

How do you modify your app to make it react to user input?
In this tutorial, you’ll add interactivity to an app that
contains only non-interactive widgets.
Specifically, you’ll modify an icon to make it tappable
by creating a custom stateful widget that manages two
stateless widgets.

The building layouts tutorial showed you how to create
the layout for the following screenshot.

When the app first launches, the star is solid red,
indicating that this lake has previously been favorited.
The number next to the star indicates that 41
people have favorited this lake. After completing this tutorial,
tapping the star removes its favorited status,
replacing the solid star with an outline and
decreasing the count. Tapping again favorites the lake,
drawing a solid star and increasing the count.