So far, we've only used StatelessWidget components to create user interfaces. These widgets are perfect for building static layouts, but they cannot change. Flutter has another type of widget called StatefulWidget. Stateful widgets can keep information and know how to recreate themselves whenever their State changes.
Compared to StatelessWidgets, StatefulWidgets have a few more moving parts. In this recipe, we're going to create a very simple stopwatch that increments its counter once a second.