What does Inflating StatefulWidget mean in Flutter?

State objects are created by the framework by calling the StatefulWidget.createState method when inflating a StatefulWidget to insert it into the tree. What does inflating StatefulWidget mean here?

Upvotes: 4

Views: 424

Answers (1)

Manish Paul
Manish Paul

Reputation: 551

Here, "inflating" means "adding". createState() helps us in adding(inflating) state(information) to our StatefulWidget.

When we create a widget(say Container widget), we add other properties to it(like height, width and background-color).

We can say that we're "inflating" our Container widget with height, width and background-color.

Upvotes: 4

Related Questions