Summary
In this chapter, we reviewed a simple Todo application that used property passing to share business logic. Then, we refactored the application to use InheritedWidgets
to share dependencies. Finally, we used the popular Provider
package to reduce the boilerplate that was introduced with inherited widgets.
By learning how to use inherited widgets and Provider
, you now know how to store and share dependencies that can be retrieved further down the tree, eliminating some of the issues of property drilling.
In the next chapter, you will learn how to build platform-specific user interfaces using the Material and Cupertino libraries.