ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
State and State Management in Flutter | Hindi
ฝัง
- เผยแพร่เมื่อ 24 ก.ย. 2022
- In Flutter, state refers to the data or information that a widget maintains and can change over time. State management refers to the process of managing and manipulating this data in a way that is efficient, consistent, and predictable.
In Flutter, there are several ways to manage state, including:
Inherited widgets: Inherited widgets are special widgets that can be used to share state with their descendants in the widget tree. They work by wrapping a widget in an inherited widget and then accessing the inherited widget's data from the descendant widgets using a BuildContext.
Scoped model: Scoped model is a third-party package that provides a simple and efficient way to share state between widgets. It works by creating a Model class that holds the state and a ScopedModel widget that wraps the widgets that need access to the state. The ScopedModel widget listens for changes to the state and automatically rebuilds the wrapped widgets when the state changes.
Provider: Provider is a third-party package that provides a simple and efficient way to manage state and dependencies in Flutter. It works by creating a ChangeNotifier class that holds the state and a ChangeNotifierProvider widget that wraps the widgets that need access to the state. The ChangeNotifierProvider widget listens for changes to the state and automatically rebuilds the wrapped widgets when the state changes.
Bloc: Bloc (Business Logic Component) is a pattern that uses reactive programming to manage state and dependencies in Flutter. It works by creating a Bloc class that holds the state and emits events when the state changes. The Bloc class is then consumed by a BlocProvider widget that wraps the widgets that need access to the state. The BlocProvider widget listens for events emitted by the Bloc class and automatically rebuilds the wrapped widgets when the state changes.
Blog: www.ahirlog.co...
My TH-cam 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
TH-cam: / ahirlog
#ahirlog #flutter #dart
Last Summer by Ikson: / ikson
Music promoted by Audio Library • Last Summer - Ikson (N...
Thanks and love from Bangladesh 💗❤️💗
Good Job bro👍👍
Thank you sir to provide us valuable content 🤗
Sooooooooooooooooooooo Help Ful
Thanks dear 😊
Welcome 😊
roadmap for flutter frontend pa aik video banao sir #LoveFromPakistan
ok
Please make video about backed by flutter it would be so helpfull
Ok
Sir firebase per video banao
Ok