These examples use GestureDetector to capture activity
on the Container.

The widget manages its own state

Sometimes it makes the most sense for the widget
to manage its state internally. For example,
ListView automatically scrolls when its
content exceeds the render box. Most developers
using ListView don’t want to manage ListView’s
scrolling behavior, so ListView itself manages its scroll offset.

The _TapboxAState class:

Manages state for TapboxA.

Defines the _active boolean which determines the
box’s current color.

Defines the _handleTap() function, which updates
_active when the box is tapped and calls the
setState() function to update the UI.

Implements all interactive behavior for the widget.

The parent widget manages the widget’s state