How to use StreamController and StreamBuilder in Flutter | Dart Stream Explanation | Hindi
HTML-код
- Опубликовано: 26 авг 2021
- Sign up for 10,000 free minutes: bit.ly/3jyzOPl
Find out more about ZEGOCLOUD: bit.ly/3VFR96F
How to build video call app: bit.ly/3WLEbVO Instagram: / rohitsemriwal
Hey, in this video we will be taking a look at Streams in Flutter/Dart. This video is not meant for the people looking for advanced stream knowledge. This is focused completely on the beginners.
This video will help you in understanding things like:
1. How to use StreamBuilder in Flutter?
2. What is a StreamController?
3. How to use Streams in Flutter?
Subscribe to the channel so you don't miss out on any future updates. Also, DM me on Instagram if you wanna learn 1 on 1 from me:
Instagram:
@rohitsemriwal
/ rohitsemriwal
See you guys in the next one ;) Развлечения
Everything is fine but one thing is missing stream close karna reh Gaya , stream close karna is necessary so we don't face any memory leaks problem
Great observation! I'll pin this comment for everyone to see 😁.
But when using a StreamBuilder, it closes its associated stream automatically when the widget is removed from the widget tree.
yaar kasam se yar bhai itne jada basic se explain karna sab ki baat nahi hai. Yaha youtube pe jo tutorials hote hai, woh toh aise explain karte h jaise apne ko sab pata hi hai. But kudos to you mahn. keep it up!!
Thanks a lot, glad you like my content 😁
Best explanation. Finally understood.
Mind blowing explaination
well explained Rohit
One of the cleanest tutorial on youtube, must be appreciated
Glad you liked it! 😁
Great job 👍
You got the amazing teaching ability😘
Very nice explanation 👌 👍 👏 😀
Sir ap jesa pore RUclips mai koi ni parha skta.sir ap legend hain❤️❤️❤️
😁😁
brother, your method is soo nice❤❤
Thanks helpful video for learning stream
Well explained
thank you so much ..
Thank You Sir
Searching this explanation from a long a time,..far far better than any video comes in top searching section , you deserve to get much more reach then you're getting right now, by the way you for this tutorial
Thanks a lot 🙏🙏 Don't forget to subscribe 😁
thank likhna bhul gaya
The way you describe in details is really good.Thank you
Glad you liked the video!
nice video
Thank you so much for easy explanation..
Keep doing
Thank you, I will!
really helpful video explanation and coding thanks keep the good videos on other topics in flutter
Glad you liked the video! I'll keep on creating more and more helpful content 😁
really good video. Enjoyed watching!!
Glad you like it! 😁
prefect want this from long time many many thanks.
Glad it helped! 😁
Well Explained. thankx for sharing.
Thanks for watching 😄
Sir, please flutter bloc advanced tuotorial hindi
Great content💥💥💥💥
Glad you like it! 😁😁
Such a nice explanation ❤❤
Glad it helped! 😁
Sir awesome explained ❤️💯
Glad to hear that
Very nice explaination
Glad you liked it!
bro keep it up nice explantaion
Glad I could help 😁
Love the way your are Explaining. thank you so much. Can you also explain Provider in depth with projects ?
Thanks for the compliment 😁, will try to do a video on Provider soon.
@@RohitSemriwal Yes sir please explain provider with real time projects
nice explanation bro
Glad you liked it
its really helpful video.I learned a lot.Please upload videos on rxdart and services and notifier
Thanks a lot 🙏 I'll take your ideas into consideration 😁
Plz all video in playlist.
simple explaination super
Glad it helped! 😁
❤️❤️❤️❤️❤️
Helpful
Thanks a lot 😁🙏
it works if i do controller.add(newData)
what is the difference when using controller.sink.add(newData)
Please explain
thanks
You're welcome
I need a video for stream builder where we get data from the API.
Dart single subscription, Broadcast stream in depth explain Hindi
Please upload video tomorrow, very hard topics
Sir streamcontroller.add() and streamcontroller.sink.add() me kya difference he kaam toh dono hi kr rha he but difference nhi samjha.
pls reply
Hi, where can i get the code ?
This explanation
Damn man m sweating 🥵
Thank you
You're welcome 😬😁
i am facing one error (stream has already been listened to) in TabBarView on change of tab and return back to tab please provide a solution thanks
you need to use brodcast stream to have multiple listener/subscriber
i have change StreamController() to StreamController.broadcast(); which resolved my issue.let me know please is this a right way?
Yes, broadcast streams can be listened to more than one time.
Sir i am using tabview its not refresh stream when i change tab
I use two tabs both tabs contains same stream when i update stream and change the tab then new tab dont show updated stream
Hi sir, can you tell me how to dispose the streams? I'm facing an issue, developing an e-commerce app, updating my profile information but when I logout and then login from another user, it shows the previous user's profile info, and someone told me to dispose the streams, can you please help me in this regards or provide any reference for this solution.
If using a streambuilder, the streams will be disposed automatically.
But if not using a StreamBuilder you can store the streamsubscription as a variable and then cancel it later.
StreamSubscription subs = newStream.listen(handle);
Then whenever you want to cancel it:
subs.cancel()
@@RohitSemriwal yes sir i'm using streamBuilder( ... ) but whenever I log out and again login with some other user profile it is showing the older one profile information, then what can be the issue according to your knowledge?
can you help me for StreamProvider?
What's the issue?
@@RohitSemriwal i don't know how to use that
Good... but background music is very disturbing...
I've fixed it in future videos 😁
It would be better if it is in English... ^_^
I'm planning on making a channel in English as well, will notify you when it's done. Thanks for watching 😁
Can you please not put an english title to a video that is in hindi?
The title clearly says Hindi at the end. Also I select language Hindi while uploading the video.
Also the thumbnail mentions that the video is in Hindi.
I get what you're saying and sorry for any inconvenience caused.