I've been experimenting with Riverpod a lot the last couple weeks and am now ready to try it in a greenfield project I've been meaning to write for some time. In lieu of a good design patterns/best practices book (if one exists I haven't found it anyway) I've been doing as best homework I can with finding videos/blog posts and little side experiments. One thing I discovered earlier this week was nested providers which I was thinking I may want to use to replace another idiom I had been using of having a provider that takes an item ID. Based on this presentation by @Randal Schwartz :vv: :vv: it sounds like that is not the way to go. In the video he does show how to do various scoping, both literal scope and logical scope, of providers in Riverpod. #riverpod #flutter #DartLang![The Riverpod](https://friendica.myportal.social/photo/preview/640/17432619)
The Riverpod "Global" Myth
Randal Schwartz debunks the "Riverpod is all globals" myth, describing several levels of scoping to get to providers.Support Randal on Patreon via https://ww...YouTube
smellsofbikes likes this.
Randal Schwartz :vv: :vv: reshared this.
Clifton Labrum
in reply to Hank G ☑️ • • •After trying lots of state management libraries, I finally settled on watch_it. I really like it:
https://pub.dev/packages/watch_it
watch_it | Flutter Package
Dart packagesHank G ☑️ likes this.
Hank G ☑️
in reply to Clifton Labrum • •Clifton Labrum
in reply to Hank G ☑️ • • •I tried Riverpod a couple times and just couldn’t wrap my head around it. WatchIt feels simple to me (like Provider) but with the goodness of GetIt built in.
It’s nice that we have so many options!
Hank G ☑️ likes this.
Hank G ☑️
in reply to Clifton Labrum • •When I first started Flutter and couldn't get my head wrapped around state management Riverpod was the new hotness and I just couldn't get there. I did get my head wrapped around Provider. When I wrote this post series to show how flexible Dart and Flutter were for deployment targets I had no choice but to use something other than Provider since there were non-Flutter implementations. I decided to give Riverpod a second try and really liked it.
I was just saying yesterday that Flutter's agnosticism on things like state management is a double edged sword. It drastically increases the learning curve for less than trivial apps but it's nice having the flexibility once you get used to it. #flutter #DartLang
Dart Snake Project Part 1: Showing Off Dart (And Learning New Things)
N=1 Lifestyle