I don’t get it. I can’t share your enthusiasm for Riverpod. I don’t like “magic" in code, as it encourages “I don’t understand but I do it anyway" type behavior. Judged by the examples you provide (no pun intended), I find Riverpod confusing. You declare global variables as some StateProvider. You have to use a magic function in main. Then you have to differentiate: if you want to read from it, you have to watch() it, and if you want to write to it, you have to context.read() it. Where’s the simplicity of global variables now? And who in their right mind would hide the **write** functionality behind a method called **read**? How could anyone be a fan of this? To me, wrapping all those global variables (I don’t hate on globals, they can be the perfect tool for the job) in a simple ChangeNotifier seems far more suitable and consistent and far less confusing. I am on the fence of finding the recommendation of your described approach using Riverpod a disservice to fellow programmers: it doesn’t take much to implement and use a ChangeNotifier and get --in me eyes-- a far clearer and easier to remember access pattern, less “messy" code that is easy to maintain and on top of it you can even put some “business logic" in there, instead of having it scattered across widgets.
I hope I don’t cause hard feelings with my comment, I tend to have very strong opinions and this time I just “had to speak out". I like many of your other articles.