From bcc8c5bd350919dcd59a0a7c688e731c783deb50 Mon Sep 17 00:00:00 2001 From: Greg Eades Date: Tue, 11 Jul 2023 11:22:14 -0400 Subject: [PATCH] Update 130-The-Widget-Tree.md: correct misspelling --- pages/130-The-Widget-Tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/130-The-Widget-Tree.md b/pages/130-The-Widget-Tree.md index 85ac5a3..94aa5b2 100644 --- a/pages/130-The-Widget-Tree.md +++ b/pages/130-The-Widget-Tree.md @@ -179,7 +179,7 @@ class WisdomFeedState extends State{ If you are anything like me, you will ask yourself: “why is this split into 2 parts? The StatefulWidget is not really doing anything.” Well, The Flutter Team wants to keep Widgets **always** immutable. The only way to keep this statement universally true is to have the StatefulWidget hold onto the State but not actually be the State \[36\], \[37\]. -State objects have a long lifespan in Flutter. They will stick around during rebuilds or even if the Widget that they are linked to gets replaced [\[36\]](https://www.youtube.com/watch?v=AqCMFXEmf3w). So in this example, no matter how often the WisdomFeed gets rebuild and no matter if the user switches pages, the cached list of wisdoms (WisdomBloc) will stay the same until the app is shut down. +State objects have a long lifespan in Flutter. They will stick around during rebuilds or even if the Widget that they are linked to gets replaced [\[36\]](https://www.youtube.com/watch?v=AqCMFXEmf3w). So in this example, no matter how often the WisdomFeed gets rebuilt, and no matter if the user switches pages, the cached list of wisdoms (WisdomBloc) will stay the same until the app is shut down. The Lifecycle of State Objects/StatefulWidgets is a little bit more complex. I will only showcase a boiled-down version here. It contains all the methods you’ll need for this guide. You can read the full Lifecycle here: Lifecycle of StatefulWidgets [\[37\]](https://flutterbyexample.com/lesson/stateful-widget-lifecycle).