Best Riverpod starter tutorial on youtube, thanks a lot. One question: Do you know why my hotreload via android studio doesnt work whenever I change something in the providers.dart file? The app restarts but nothing works, even the circular indicators are stuck and not showing properly. have to close the app and clear cache every time, only then things work.
That's really weird. Whenever working within the providers, I sometimes need to hot restart, but that is because there is a different provider in cache than the new one that I updated
I was having a similar issue with any of my flutter apps. Solved running app (even on debug mode!) using VsCode --> Run --> Run Without Debug. Of course this only applies if you're using VSCode too... With Android Studio everything always worked out for me.
In a real scenerio, you should probably uses statenotifier or changenotifier, with a stream state and you can have methods in those that cancel the stream
Hi, what a nice video! have you ever found any issue with unit test for both GetX and Riverpod? What do you think about which one of them that is easier to test?
So I haven’t worked with Riverpod and testing yet. But to be honest I think both of them would be pretty easy to test. The fact that it is a state management solution makes testing easier because you can load specific states in.
Hey man, I've been thinking about learning a state management framework for flutter. Looking at your channel there are many videos on the topic but which one would you recommend starting with?
Abhishek Rawat to start with I would try GetX. It is the simplest one for sure. Then the flutter recommended is Provider, but it has a couple nuances that I dislike. So I would go with Riverpod over that. So Riverpod or GetX in my opinion are the ones I would use
Is there any difference between the different types of state management in terms of performance? Like is one fatster/more efficient than the other in some cases and vice versa?
As you have used GetX and Riverpod, could you explain pros and cons of each of them? Why should we choose one of them? After your video I think GetX is more easy to use.
I basically recommend this, GetX is easier to learn and great for beginners, but Riverpod has a lot of nice features and makes your code safer. So if you are a beginner or want simplicity go with GetX, if you are confident in your skills and would like these nice features try out riverpod
@@billiardoxx I actually just put out a new video on it. But for example if you use a future provider, you HAVE to handle loading and error states, or else Riverpod will show you a warning
So you don't really need to use StatefulWidget when you're using Riverpod. If you wrap all the things that actually change within a provicer, then it should be handled.
Yes. State management is a how you maintain state throughout your application. Architecture pattern is how the whole application is laid out. They are tied together very often because how you manage state will dictate how your app architecture is laid out. Basically good architecture patterns USE state management.
haha they are both great! I think depends what you are looking for. I like the structure of GetX and the simplicity, but I also like the safety of riverpod
@@tadaspetra yeah momentum is pretty cool. it's by one guy and I accidentally found it by chance on reddit and I'm surprised not more are talking about it. There's so many though, I tend to stick to the ones w/ solid documentation. I haven't stuck to one just yet, I'm sure we'll see even more in the coming months as things are picking up in the flutter world.
G4MR Plays I hope they stop lol. I feel like it’s best to just pick one and go with it. I’ll probably be sticking with Riverpod and GetX depending on the app 😊
The thing you are calling ref .. it is context .. renaming it doesn't mean sense.. if you cant access it outside of build method.. then you can't say that .. it is not depend on context .. but you can say that it hi des the complexities of provider..
It is named "ref" in the documentation and it is technically a ProviderReference. What you say is true, but I don't think there's any problem with naming it ref
You are a good person. I wish you and your loved ones health and happiness.
KENAN DEMİR thank you very much! I really appreciate it 😊
Thank you soo so much... I have been searching for an easy to understand riverpod video, and this is the one that made most sense.
Thank you.
My pleasure 😊 glad I could help
Great video! Those editing skills are starting to show I see!
Robert Brunhage haha slowly but surely 😊
Great video, I saw lots of video about riverpod, but didn't get. You explanation is amazing. Thank you so much.
Khan Israr Ahmed Ali Husain thank you! That means a lot 😊
UA-cam have a lot of tutorials, this is very good for those that are learning and doesn't have much programming experience
Thank you so much 😊
Testing is very important! Just found your channel and started learning how to code recently. Do more of those for sure :)
Nice, good luck on your coding journey 😊
Guy, you are the best.
Thank you!! I am planning another Riverpod video soon
Amazing explanation!
Thank you 😊
Good lecture! Always very very very very thanks to you!
Haha, even though I am dumb, when it comes to flutter, this was an amazing explanation, and i really love it!
Sunrit Jana thank you! I really appreciate it!!
Best Riverpod starter tutorial on youtube, thanks a lot. One question: Do you know why my hotreload via android studio doesnt work whenever I change something in the providers.dart file? The app restarts but nothing works, even the circular indicators are stuck and not showing properly. have to close the app and clear cache every time, only then things work.
That's really weird. Whenever working within the providers, I sometimes need to hot restart, but that is because there is a different provider in cache than the new one that I updated
I was having a similar issue with any of my flutter apps. Solved running app (even on debug mode!) using VsCode --> Run --> Run Without Debug. Of course this only applies if you're using VSCode too... With Android Studio everything always worked out for me.
Thanks, good video.
Thank you 😊
Do you recommand a particular state manager when we use graphql for flutter?
I haven’t actually used graphql so idk if I’m the best person to give advice for that
Dear Tadas,
The Stream you've shown here is left open, how can i make sure once the stream reaches 5 as the number, to close it?
Thanks!
In a real scenerio, you should probably uses statenotifier or changenotifier, with a stream state and you can have methods in those that cancel the stream
Any reason why you might choose ChangeNotifierProvider over StateNotifierProvider? They seem to do pretty much the same thing?
StateNotifier is immutable, while ChangeNotifier is mutable. Depends which one you prefer
@@tadaspetra ah right. good to know the difference. thanks for the reply.
exactly my question thanks haha
I think you may use ChangeNotifier if you want to listen to more than one variable
Hi, what a nice video! have you ever found any issue with unit test for both GetX and Riverpod? What do you think about which one of them that is easier to test?
So I haven’t worked with Riverpod and testing yet. But to be honest I think both of them would be pretty easy to test. The fact that it is a state management solution makes testing easier because you can load specific states in.
Hey man, I've been thinking about learning a state management framework for flutter. Looking at your channel there are many videos on the topic but which one would you recommend starting with?
Abhishek Rawat to start with I would try GetX. It is the simplest one for sure. Then the flutter recommended is Provider, but it has a couple nuances that I dislike. So I would go with Riverpod over that. So Riverpod or GetX in my opinion are the ones I would use
Thanks!
Abhishek Rawat no problem!
@@abe10 Riverpod for sure.
@@meansnada Hey man, thanks!
Is there any difference between the different types of state management in terms of performance? Like is one fatster/more efficient than the other in some cases and vice versa?
Indrajit Roy there probably technically is a difference. However, it will be a very small difference that should not affect any noticeable performance
@@tadaspetra Right. Thanks!
Can we create stateProvider of String?
yes you can 😊
flutter hooks is 3rd party packge or by Google ?
It's another package by Remi (the guy that made Provider), but rumor has it, Google might add it into Flutter itself
As you have used GetX and Riverpod, could you explain pros and cons of each of them? Why should we choose one of them? After your video I think GetX is more easy to use.
I basically recommend this, GetX is easier to learn and great for beginners, but Riverpod has a lot of nice features and makes your code safer. So if you are a beginner or want simplicity go with GetX, if you are confident in your skills and would like these nice features try out riverpod
End of the day whatever one works best for you is the one to stick with!
@@tadaspetra Ok, I agree with that, BUT how does Riverpod make your code safer? can you explain it in more detail? Thanks.
@@billiardoxx I actually just put out a new video on it. But for example if you use a future provider, you HAVE to handle loading and error states, or else Riverpod will show you a warning
Riverpod with Statefulwidget?? can u pls explain
So you don't really need to use StatefulWidget when you're using Riverpod. If you wrap all the things that actually change within a provicer, then it should be handled.
Which VS Code theme you use?
It’s called Pitch Black
I am new to development, I have a question, is state management and architecture pattern two different things?
Yes. State management is a how you maintain state throughout your application. Architecture pattern is how the whole application is laid out. They are tied together very often because how you manage state will dictate how your app architecture is laid out. Basically good architecture patterns USE state management.
@@tadaspetra how many architecture patterns for flutter? (Suitable for flutter)
Can you do a tutorial on calling native code/plugins from flutter also dart ffi
Mr Random this is a topic I've been meaning to look into!
Your videos are great your explanation is great, just because im almost blind please put your code bigger, please! still liked the video
haha, I will see if I can make it a little bit bigger, thank you for the feedback 😊
I saw your testing videos bro
GetX or Riverpod ???
this is the question!!
haha they are both great! I think depends what you are looking for. I like the structure of GetX and the simplicity, but I also like the safety of riverpod
@@tadaspetra
watch your video quickly !! when you say "security" you mean the states data: loading: error: in for example the Future ??
Martin Melchior yes. With Futures and Streams it covers all the cases and gives an error if you are missing one
I prefer getx as it reduces code size
thanks...can you make an app using getx & firebase
I actually made a todo app with getx & firebase ua-cam.com/play/PL26uY6-lIzqm-P1_Hi072D9FzwltjhAGG.html
0:00 Your last what?
It's not easier than I thought 😅
It is a bit more complex, but I think if you get comfortable with it, it's a lot more powerful
@@tadaspetra in this time. i'm enjoying with Riverpod. Thanks for your insight :)
You should give Momentum a try next
I haven't even heard of that one. There are so many haha. But Momentum has some nice documentation!
@@tadaspetra yeah momentum is pretty cool. it's by one guy and I accidentally found it by chance on reddit and I'm surprised not more are talking about it. There's so many though, I tend to stick to the ones w/ solid documentation. I haven't stuck to one just yet, I'm sure we'll see even more in the coming months as things are picking up in the flutter world.
G4MR Plays I hope they stop lol. I feel like it’s best to just pick one and go with it. I’ll probably be sticking with Riverpod and GetX depending on the app 😊
@@tadaspetra lol yeah same, I'm going to dabble with Riverpod, but probably stick with Momentum from now.
The best?
Mitzuko Davis no no. No such thing as the best for any solution. But in my opinion, better then provider
udpate the video bro
The thing you are calling ref .. it is context .. renaming it doesn't mean sense.. if you cant access it outside of build method.. then you can't say that .. it is not depend on context .. but you can say that it hi des the complexities of provider..
It is named "ref" in the documentation and it is technically a ProviderReference. What you say is true, but I don't think there's any problem with naming it ref
Easy peasy, but not Getx easy lol
j heisler yes exactly. But there are some benefits, it is more safe and all cases need to be covered or you will get an error