This Given Link Describes Provider.of
in the text its using a example of a basic shopping app with items whic can be added by tapping. Here Provider.of is used to remove all contents of the cart. and it mentions "We could use Consumer for this, but that would be wasteful. We’d be asking the framework to rebuild a widget that doesn’t need to be rebuilt."
Provider.of<CartModel>(context, listen: false).removeAll();
Here we can clearly see contents of the cart are changed and hence requires a rebuild... then why does it uses PRovider.of and mentions it doesnt require a rebuild.