Stateful Widget Lifecycle and Stateless Widgets | Widget Lifecycle | Hindi
HTML-код
- Опубликовано: 22 авг 2024
- In Flutter, a stateful widget is a widget that maintains state, or stateful data, throughout its lifecycle. A stateless widget, on the other hand, is a widget that does not maintain state and is rebuilt every time its parent widget is rebuilt.
The lifecycle of a stateful widget consists of several stages, including creation, initialization, building, and disposal.
Here is an overview of the lifecycle of a stateful widget in Flutter:
Creation: The stateful widget is created and a new instance of its associated state class is also created.
Initialization: The initState method is called on the state object. This is the first method to be called in the lifecycle of a stateful widget and is a good place to perform one-time setup tasks, such as initializing variables or performing async operations.
Building: The build method is called on the state object. This method is responsible for building the widget tree that represents the widget. The build method is called every time the widget's parent widget is rebuilt, and is used to update the widget's appearance.
Disposal: The dispose method is called on the state object when the widget is removed from the tree. This is a good place to perform cleanup tasks, such as disposing of resources or canceling async operations.
Blog: www.ahirlog.co...
My RUclips Gear:
Boya BYM1(Mic): amzn.to/3bvm69j
Redmi Note 7 Pro(Mic & Camera): amzn.to/3uRkVsb
MSI Motherboard: amzn.to/3fiQHYO
Intel i3 Processor: amzn.to/3w8TWbQ
Mouse: amzn.to/3yb8PMP
Keyboard: amzn.to/3bvmtkd
Wifi Adaptor: amzn.to/3fiQYuO
SSD: amzn.to/3w2w2Pa
Speakers: amzn.to/3w6pKhv
Instagram: / ahirlog
Facebook: / ahirlog
Twitter: / ahirlog
RUclips: / ahirlog
#ahirlog #flutter #dart
Last Summer by Ikson: / ikson
Music promoted by Audio Library • Last Summer - Ikson (N...
Really thanks , the content was awesome.
Thank You Sir
Thank you sir!
OSM
Thank you
Sir start project on ur channel
Aapka contact no. Milega sir?? I really need