Inherited Widgets: Introduction
Explore the concept of inherited widgets in Flutter to understand how they manage state efficiently by passing context down the widget tree. Learn how this approach reduces widget rebuilds compared to the setState method, enabling more effective state management in complex Flutter applications.
We'll cover the following...
Inherited widgets
The inherited widget is one of the low-level processes of state management in Flutter. However, when it manages its state, it also propagates information down the tree. To do that, it acts as a base class. Thus, although state management is a complex topic, we can manage it quite comfortably through inherited widgets.
This lesson concentrates on inherited widgets only, as this is a fundamental concept in Flutter. This will significantly help us manage a widget’s state efficiently.
We do this to manage widget states more efficiently.
However, before proceeding further, let’s check the diagram below to see how we can float a state to the bottom-most widget without affecting the parent widgets.
Let’s not forget that Flutter is all about widgets.
Flutter builds a tree and subtree of widgets to build an application. Flutter builds its widgets similar to a family tree ...