The more you learn online for years, the less you watch videos. But I'm so hooked on your style, I don't watch long videos usually but damn you understand things so deeply and know how to explain them. I have a lot of respect for you and your work. Just incredible
Thanks so much for this comment. I really appreciate all of the feedback you give me. I'm honestly just learning as I make these videos (I kinda make them for myself tbh), but it's fantastic to hear when other people also find them useful. Cheers man :)
@@FunwithFlutter This such a cool thing for you to share with us. I honestly think your method is wonderful and I also like explaining stuff to other people hence it allows you to know all areas to perfectly explain it. Thanks for sharing honestly, Your work is much appreciated, and I'm so humble and glad to hear that feedback motivates you, Do your own thing! Learn more! Definitely use this for your own stuff. I'm cheering for you Mate!
I added your Lit Package to an app I am writing to try Riverpod. Lit worked fine, it saved me time and is easy to use. I look forward to trying phone authentication. In the meantime back to Riverpod.
Great to see that you made a vid about Riverpod!! It really is the next Provider, solving Providers issues that prohibits us from using it in Prod (therefor having to use Bloc...Meh). Keep up with the great work man! Cheers from New Zealand
This is so nice. It's more like how state is done in vue.js with vuex. Coming from vue to flutter i've been a little confused / disappointed with how different the state management works. Even with Provider, there's so much boiler plate. This makes things much better!
The only reason I didn't was because this is not my example. It's an example taken from the Riverpod repo. But I'll keep this in mind for my future tutorials.
@@FunwithFlutter can you please make videos about multiple screen app with riverpod? I have difficulties grasping this public provider concept (coming from native kotlin mvvm). I can create a simple 4 screen app with login, dashboard, list, and create item with provider, but I can't see how I can manage the providers (especially using riverpod) when I have around 50 screens. I wanted to convert my native app with around 50 screens to flutter. Forgive me if you already make that kind of videos.
Awesome video! If using hooks_riverpod, does this replace all stateful widgets with HookWidgets going forward? Is useMemoized/useEffect a substitute for initState? Is there a downside not be able to call setState? Say if I have a function that runs when i click on a button, how would I update the state to reflect the new value of a text widget in the build for example?
To answer your last question, Riverpod is your state management. So you can create StateProviders to handle the state, instead of using StatefulWidget. But you don't have to use HookWidget (only if you want to use hooks). You can instead use a ConsumerWidget. Or use a Consumer() widget. There are a couple of ways to read the providers. Suggest you take a look at the docs. But I'm making an updated video on this. Should hopefully release tomorrow
Hi! Thank you so much for the course it was really informative! I have a problem in which when I use this package with device_preview it gives an error. Can you please check that out? Thanks again.
This is a really old video. There has been big changes. Compute is now in every provider. So just create a new provider and that will only update if the value changes
thannks for the video. just a question, why do we have to create a new entire list on the methods add, toggle,edit and remove ? can't we just simply use the List methods of dart(add, removeat and so on ) ? thanks
'Tis a good question. If you're coming from ChangeNotifier, then sure, you can modify the current list and then call notifyListeners(). But here you are triggering the "notifyListeners" (although it's something different with StateNotifer) by setting the state to a new value. Take a look at the setter for the state variable in the package's code. Also, if you modify the list directly then it will still be the same instance. Basically the StateNotifier will only trigger an update for it's listeners when the state is reassigned. Could also have used an Immutable list in this example, with something like pub.dev/packages/kt_dart. There are benefits to using immutable collections in general.
@@FunwithFlutter I m still wondering how can be more performance the StateNotifier way of creating a new entire state. For example on toggle method my logic says doing this void toggle(String id){ state.forEach((element) { if(element.id == id) element.done = !element.done; }); } would be more performance. however, I have to hot reload each time the app to see a change. I just see it more counter-intuitive. Thank you
Hi. I'm already on Master channel, flutter upgraded to 1.20, what else i need to be able to compile to desktop on windows? I don't have folders windows or web when creating a project. Thanks
> flutter config --enable-windows-desktop > flutter config --enable-web And then run this in the project directory. This should create the web and windows builds > flutter create .
Thanks man. I will at some point.. But in the meantime there are some great examples by Rody Davis that you should check out - ua-cam.com/channels/qc2elhr0N52GVsyNaWtLvA.html
It's the point where these providers are exposed into the widget tree. The providers are accessed from the ProviderScope, not from their global initialisation.
Hi, You used todoListProvider.read(context).remove(todos[i]); but this doesn't work at all, it says read isn't defined for StateNotifierProvider so I am not sure how it worked for you. I looked up Remi's code and he used context.read(todoListProvider).remove(todos[i]); which worked for me too.
I'm making updated videos on Riverpod that goes into greater detail and cover all of the updates. The first two vids are out and the third is coming soon.
Computed no longer works, Remi got rid of it in 0.6.0. Now, all providers are computed: github.com/rrousselGit/river_pod/issues/80#issuecomment-674173471
The more you learn online for years, the less you watch videos. But I'm so hooked on your style, I don't watch long videos usually but damn you understand things so deeply and know how to explain them. I have a lot of respect for you and your work. Just incredible
Thanks so much for this comment. I really appreciate all of the feedback you give me. I'm honestly just learning as I make these videos (I kinda make them for myself tbh), but it's fantastic to hear when other people also find them useful. Cheers man :)
@@FunwithFlutter This such a cool thing for you to share with us.
I honestly think your method is wonderful and I also like explaining stuff to other people hence it allows you to know all areas to perfectly explain it. Thanks for sharing honestly, Your work is much appreciated, and I'm so humble and glad to hear that feedback motivates you, Do your own thing! Learn more! Definitely use this for your own stuff. I'm cheering for you Mate!
After watching this, I might have to use it for a bigger application 😉
Wink wink
I will be using it so please make more. By the way I like your rambling because it made it easy to understood everything you explained.
Nice! I'll ramble more then :)
So this is how it feels like to be early. Great video as always
Thanks!
How did you feel
I added your Lit Package to an app I am writing to try Riverpod. Lit worked fine, it saved me time and is easy to use. I look forward to trying phone authentication. In the meantime back to Riverpod.
Thanks John! You didn't happen to test out the Apple Sign in functionality? I also need to get back to Riverpod
@@FunwithFlutter No I didn't, I have been a little busy and I must admit my spare time is spent on Riverpod.
Great to see that you made a vid about Riverpod!!
It really is the next Provider, solving Providers issues that prohibits us from using it in Prod (therefor having to use Bloc...Meh).
Keep up with the great work man!
Cheers from New Zealand
I used to dislike bloc, but it's growing on me - definitely check out Cubit (lightweight bloc). But yeah, Riverpod might have stolen my heart.
Congratulations on your channel and we are waiting for a video about GetX!
This is so nice. It's more like how state is done in vue.js with vuex. Coming from vue to flutter i've been a little confused / disappointed with how different the state management works. Even with Provider, there's so much boiler plate. This makes things much better!
Great video, thanks for taking the time to put it together. New subscriber here!
You're welcome, thanks for joining!
Damn this is much better than Provider.
I really like it!
Tremendous value men. Great video! Already subscribe. Keep up the good work ;)
Thanks for the sub!
Please do make a nupdated video including freezed riverpod and hooks. These are the must know topics in flutter nowadays.
A starter project with todos to implement would have been a great addition to follow along
The only reason I didn't was because this is not my example. It's an example taken from the Riverpod repo. But I'll keep this in mind for my future tutorials.
@@FunwithFlutter Yeah makes sense. Thanks! the tutorial was clear though
Very nice video
Nice tutorial, I tried using the Compute() and it seems it is no longer supported, any suggestions?
All of the Providers now function as compute🤗. So it's easier. Check the documentation for examples!
Great video, thanks. I wonder how it scales, if you have only one provider for all states you may create in your app
Nope, you don't only have one provider. In the video I make multiple different ones. They're just "inserted" at the same point.
@@FunwithFlutter can you please make videos about multiple screen app with riverpod? I have difficulties grasping this public provider concept (coming from native kotlin mvvm). I can create a simple 4 screen app with login, dashboard, list, and create item with provider, but I can't see how I can manage the providers (especially using riverpod) when I have around 50 screens. I wanted to convert my native app with around 50 screens to flutter. Forgive me if you already make that kind of videos.
Awesome video! If using hooks_riverpod, does this replace all stateful widgets with HookWidgets going forward? Is useMemoized/useEffect a substitute for initState? Is there a downside not be able to call setState? Say if I have a function that runs when i click on a button, how would I update the state to reflect the new value of a text widget in the build for example?
To answer your last question, Riverpod is your state management. So you can create StateProviders to handle the state, instead of using StatefulWidget. But you don't have to use HookWidget (only if you want to use hooks). You can instead use a ConsumerWidget. Or use a Consumer() widget. There are a couple of ways to read the providers. Suggest you take a look at the docs. But I'm making an updated video on this. Should hopefully release tomorrow
Fun with Flutter Awesome thanks! What do you prefer, using hooks or the traditional consumer way for riverpod?
Looking forward to the next riverpod video! 🎉🎉
I use the normal Consumer one, unless I plan on using hooks as well. Using wach(provider) is nicer to read, than useProvider(provider)
Hi! Thank you so much for the course it was really informative!
I have a problem in which when I use this package with device_preview it gives an error.
Can you please check that out?
Thanks again.
What is the error you're getting?
is Computed() not supported now? I got a red warning where it says undefined name.
This is a really old video. There has been big changes. Compute is now in every provider. So just create a new provider and that will only update if the value changes
How did you get "Windows desktop(windows-X64)" as an emulator device in VS Code?
Check on the Flutter website for desktop support.
does computed still exists? couldnt find anything in the docs and i cant call it on the code
Nope. Now every Provider works as a Computed. So it's better
thannks for the video. just a question, why do we have to create a new entire list on the methods add, toggle,edit and remove ? can't we just simply use the List methods of dart(add, removeat and so on ) ? thanks
'Tis a good question. If you're coming from ChangeNotifier, then sure, you can modify the current list and then call notifyListeners(). But here you are triggering the "notifyListeners" (although it's something different with StateNotifer) by setting the state to a new value. Take a look at the setter for the state variable in the package's code. Also, if you modify the list directly then it will still be the same instance. Basically the StateNotifier will only trigger an update for it's listeners when the state is reassigned. Could also have used an Immutable list in this example, with something like pub.dev/packages/kt_dart. There are benefits to using immutable collections in general.
Fun with Flutter thank you so much for the explination. It’s really kind you took your time .
@@FunwithFlutter I m still wondering how can be more performance the StateNotifier way of creating a new entire state. For example on toggle method my logic says doing this
void toggle(String id){
state.forEach((element) {
if(element.id == id)
element.done = !element.done;
});
}
would be more performance. however, I have to hot reload each time the app to see a change. I just see it more counter-intuitive. Thank you
Hi. I'm already on Master channel, flutter upgraded to 1.20, what else i need to be able to compile to desktop on windows? I don't have folders windows or web when creating a project. Thanks
> flutter config --enable-windows-desktop
> flutter config --enable-web
And then run this in the project directory. This should create the web and windows builds
> flutter create .
@@FunwithFlutter Thanks man. You are awesome.
Amazing Tutorial 👌👌👌👌. Please Make Response Design for flutter UI
Thanks man. I will at some point.. But in the meantime there are some great examples by Rody Davis that you should check out - ua-cam.com/channels/qc2elhr0N52GVsyNaWtLvA.html
great work
Thanks!
Why we need Providerscope, if all providers are global and available to all widgets directly?
It's the point where these providers are exposed into the widget tree. The providers are accessed from the ProviderScope, not from their global initialisation.
Hi,
You used todoListProvider.read(context).remove(todos[i]); but this doesn't work at all, it says read isn't defined for StateNotifierProvider so I am not sure how it worked for you. I looked up Remi's code and he used context.read(todoListProvider).remove(todos[i]); which worked for me too.
I think there was an update to Riverpod between this video and now. Computed() was also replaced and merged with Provider()
Very correct
I'm making updated videos on Riverpod that goes into greater detail and cover all of the updates. The first two vids are out and the third is coming soon.
@@FunwithFlutter very very much appreciated!! 🙏🙏🥳
Use this: context.read(todoListProvider).remove(todos[i]);
plz make a full video api calling with river_pod package or explain river_pod/examples/marvel/ app
For sure, I think I'll be making a lot more vids about Riverpod
computed is no more available?
Nope! Normal providers now act like computed
amazing video! Cubit next please?
Get out of my head. I was actually planning to do Cubit first and then last minute decided to make a video on Riverpod instead.
@@FunwithFlutter also please give your thoughts on which is objectively better/which one feels better.
what font do you use please?
Cascadia Code, I love it
👍👍👍
15:18 if its a null then its empty list(just improvising)
Is that a South African accent I hear?
None other 🇿🇦
@@FunwithFlutter sick boet! Well done!
Computed no longer works, Remi got rid of it in 0.6.0. Now, all providers are computed:
github.com/rrousselGit/river_pod/issues/80#issuecomment-674173471
Thanks! Do you know of any good examples (repos) showcasing Riverpod?