A StatefulWidget has mutable state kept in a State object. Calling setState changes this state and asks Flutter to rebuild the widget to reflect the change. It suits local state, such as a counter or an input field.
Example
setState(() {
compteur++;
});