STATEFUL AND STATELESS WIDGET IN FLUTTER

STATEFUL AND STATELESS WIDGET IN FLUTTER

·

1 min read

Most beginners are confused about the two states in flutter, i was confused too when i started so its not a big deal , so lets dive in. In Google's UI toolkit which is flutter for developing cross platforms native applications there are two custom widget which determine the state of our app i.e how our app will function, lets look into them below

1.Stateless widget 2.Stateful widget

  1. Stateless widget: In this type of widget/state the app does not change its state that is visible to the user rather the app is static in its state but something can be going on right inside the console which is visible to the developer, this type of widget provides less functionality in our apps.

  2. Stateful widget: This type of widget is the opposite of the stateless widget, here the state of our app changes while it is being controlled by the user, this type of widget creates space for more functionality in the app created.