title: How to work with 'Add items to cart' dynamically in flutter
body: <p>Can someone help me how to update a List in &quot;cart_products.dart&quot; on clicking &quot;addToCart&quot; button from a different dart file(different UI)? Hard coded List is working but I have no idea how to update the List dynamically. It would be a great help for new comers if someone can demonstrate with a simple example. Thank you.</p>