Created
August 23, 2019 18:28
-
-
Save rullyalves/1f879fea8d115691baafb41d601d5e03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ShoppingCartNotifier extends ChangeNotifier { | |
| ShoppingCart cart = ShoppingCart(); | |
| remove(Item item) { | |
| cart.remove(item); | |
| notifyListeners(); | |
| } | |
| add(Item item) { | |
| cart.add(item); | |
| notifyListeners(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment