createState method Null safety Creates the mutable state for this widget at a given location in the tree . Subclasses should override this method to return a newly created instance of their associated State subclass: @override State<MyWidget> createState() => _MyWidgetState();
Read moreWhat is stateful and stateless in Flutter?
Stateful and stateless widgets 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.
Read more