To accomplish this, you’ll create a single custom widget
that includes both the star and the count,
which are themselves widgets. Tapping the star changes state
for both widgets, so the same widget should manage both.

You can get right to touching the code in
Step 2: Subclass StatefulWidget.
If you want to try different ways of managing state,
skip to Managing state.

Stateful and stateless widgets

A widget is either stateful or stateless. If a widget can
change—when a user interacts with it,
for example—it’s stateful.

A stateless widget never changes.
Icon, IconButton, and Text are
examples of stateless widgets. Stateless widgets
subclass StatelessWidget.

Checkbox,

Radio,

Slider,

InkWell,

Form, and