September 2019
Beginner
512 pages
12h 52m
English
Besides statelessWidget and statefulWidget, there is one more type of widget in the Flutter framework, InheritedWidget. Sometimes, one widget may need to have access to data up the tree, and in such a case, we would need to replicate the information down to the interested widget. This process is shown in the following diagram:

Let's suppose some of the widgets down the tree need to access the title property from the root widget. To do that, with statelessWidget or statefulWidget, we would need to replicate the property in the corresponding widgets and pass it down through the constructor. It can be annoying to replicate the ...
Read now
Unlock full access