How to manage application states using inherited widgets
summary
Claims a lightweight state system built with InheritedWidget and a small wrapper that owns state and exposes AppStateScope APIs. Uses a sample Flutter Web app, implements a data class with copyWith, and three migrations—ShoppingCartIcon, ProductListWidgets, and the search box—so updates flow through setProductList and addToCart/removeFromCart. The result is a centralized app state that updates the cart badge and product list live and the demo works as shown.
AI-written summary · about
chapters (10)
- 0:00Start
- 7:00Staple Widgets
- 8:19Product List Widgets
- 10:25Create a Constructor
- 16:15Updation Notified Methods
- 18:23Depend on Inherited Widgets of Exact Type
- 27:18State Management System
- 28:30Migrating the Stable Widgets To Use Absolute Widgets
- 29:29To Convert Shopping Cart Icon to a Stateless Widgets
- 32:02Toggle Search
related talks
34mBuild reactive mobile apps with Flutter
29mBasic Strategies for State Propagation and Access Control in Flutter Widget Trees
19mA humble approach to Flutter app architecture
44mState Management in Flutter
50mFlutter: The Wizards of Widgets
51mFlutter: How Widgets Work
18mEasy state restoration with Flutter
44mState in Jetpack Compose
