Chapter 6: Creating a Shopping Cart Application Using Basic Approaches
The previous chapter ended our journey of exploring and understanding the basics of different state management techniques. The next three chapters will focus on creating working examples of a simple shopping cart application containing a few screens, along with the functionality of adding and removing pre-listed items to and from the cart.
Starting from this chapter, we will see how to create a shopping cart application using setState
, InheritedWidget
, and InheritedModel
.
We will be creating a two-screen application with each of the three aforementioned techniques. The first screen will display available items that can be added to the cart, while the second screen will display items that have been added to the cart. You can add/remove items to/from both screens. Both screens will be displaying the latest and updated cart items.
To be more specific, we will create the following screens for each of the techniques...