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 ;)
  • РазвлеченияРазвлечения

Комментарии • 89

  • @jontysingh4334
    @jontysingh4334 2 года назад +5

    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

    • @RohitSemriwal
      @RohitSemriwal  2 года назад +4

      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.

  • @SAURABHGUPTA_DINOSAUR
    @SAURABHGUPTA_DINOSAUR Год назад +2

    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!!

    • @RohitSemriwal
      @RohitSemriwal  Год назад +1

      Thanks a lot, glad you like my content 😁

  • @mondal1839
    @mondal1839 Год назад

    Best explanation. Finally understood.

  • @KevalMotisariya-cs3gh
    @KevalMotisariya-cs3gh Год назад

    Mind blowing explaination

  • @VikashYadav-zo4gu
    @VikashYadav-zo4gu 10 месяцев назад

    well explained Rohit

  • @cosif3001
    @cosif3001 2 года назад +2

    One of the cleanest tutorial on youtube, must be appreciated

  • @RahulKumar-kg3hu
    @RahulKumar-kg3hu Год назад

    Great job 👍

  • @sabinkc7276
    @sabinkc7276 Год назад

    You got the amazing teaching ability😘

  • @shreypandit4540
    @shreypandit4540 Год назад

    Very nice explanation 👌 👍 👏 😀

  • @khubaibirfan9215
    @khubaibirfan9215 Год назад

    Sir ap jesa pore RUclips mai koi ni parha skta.sir ap legend hain❤️❤️❤️

  • @imranakbarofficial452
    @imranakbarofficial452 Год назад

    brother, your method is soo nice❤❤

  • @morshedraiankhan6968
    @morshedraiankhan6968 2 года назад

    Thanks helpful video for learning stream

  • @Trendspra
    @Trendspra Год назад

    Well explained

  • @mayur16
    @mayur16 2 года назад

    thank you so much ..

  • @30vijaytyagi9
    @30vijaytyagi9 8 месяцев назад

    Thank You Sir

  • @Abhishekyadav-mg5vu
    @Abhishekyadav-mg5vu 2 года назад +3

    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

  • @MehediHasan-cc4hz
    @MehediHasan-cc4hz Год назад

    The way you describe in details is really good.Thank you

  • @madmilitiangaming5694
    @madmilitiangaming5694 Год назад

    nice video

  • @JAY-bo7tg
    @JAY-bo7tg 2 года назад

    Thank you so much for easy explanation..
    Keep doing

  • @akshayvqube9626
    @akshayvqube9626 2 года назад

    really helpful video explanation and coding thanks keep the good videos on other topics in flutter

    • @RohitSemriwal
      @RohitSemriwal  2 года назад

      Glad you liked the video! I'll keep on creating more and more helpful content 😁

  • @Anom21
    @Anom21 2 года назад

    really good video. Enjoyed watching!!

  • @abdulrehmananwar6990
    @abdulrehmananwar6990 2 года назад

    prefect want this from long time many many thanks.

  • @ajaykotiyal427
    @ajaykotiyal427 2 года назад

    Well Explained. thankx for sharing.

  • @kamalCode
    @kamalCode 2 года назад +2

    Sir, please flutter bloc advanced tuotorial hindi

  • @uveshsiddiqui2477
    @uveshsiddiqui2477 2 года назад

    Great content💥💥💥💥

  • @designer-developer3886
    @designer-developer3886 2 года назад

    Such a nice explanation ❤❤

  • @somnathdas8922
    @somnathdas8922 2 года назад

    Sir awesome explained ❤️💯

  • @moizrehman791
    @moizrehman791 Год назад

    Very nice explaination

  • @amansingh.h716
    @amansingh.h716 2 года назад +1

    bro keep it up nice explantaion

  • @vivekprasad2703
    @vivekprasad2703 2 года назад +3

    Love the way your are Explaining. thank you so much. Can you also explain Provider in depth with projects ?

    • @RohitSemriwal
      @RohitSemriwal  2 года назад +2

      Thanks for the compliment 😁, will try to do a video on Provider soon.

    • @mudassarali458
      @mudassarali458 2 года назад +1

      @@RohitSemriwal Yes sir please explain provider with real time projects

  • @pheonixway8029
    @pheonixway8029 Год назад

    nice explanation bro

  • @piyushgoyal6219
    @piyushgoyal6219 2 года назад

    its really helpful video.I learned a lot.Please upload videos on rxdart and services and notifier

    • @RohitSemriwal
      @RohitSemriwal  2 года назад

      Thanks a lot 🙏 I'll take your ideas into consideration 😁

  • @kamalCode
    @kamalCode 2 года назад

    Plz all video in playlist.

  • @Physics3333
    @Physics3333 2 года назад

    simple explaination super

  • @khubaibirfan9215
    @khubaibirfan9215 Год назад

    ❤️❤️❤️❤️❤️

  • @thinkGrey_
    @thinkGrey_ 2 года назад

    Helpful

  • @saiham4500
    @saiham4500 Год назад

    it works if i do controller.add(newData)
    what is the difference when using controller.sink.add(newData)
    Please explain

  • @rashidulislam1183
    @rashidulislam1183 2 года назад

    thanks

  • @97016580
    @97016580 2 года назад

    I need a video for stream builder where we get data from the API.

  • @kamalCode
    @kamalCode 2 года назад +2

    Dart single subscription, Broadcast stream in depth explain Hindi

    • @kamalCode
      @kamalCode 2 года назад +1

      Please upload video tomorrow, very hard topics

  • @wanttobecoder7771
    @wanttobecoder7771 Год назад

    Sir streamcontroller.add() and streamcontroller.sink.add() me kya difference he kaam toh dono hi kr rha he but difference nhi samjha.
    pls reply

  • @hiraamirbux6178
    @hiraamirbux6178 8 месяцев назад

    Hi, where can i get the code ?

  • @keteretsu9252
    @keteretsu9252 2 года назад

    This explanation
    Damn man m sweating 🥵
    Thank you

  • @abdulrehmananwar6990
    @abdulrehmananwar6990 2 года назад

    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

    • @saiham4500
      @saiham4500 Год назад

      you need to use brodcast stream to have multiple listener/subscriber

  • @abdulrehmananwar6990
    @abdulrehmananwar6990 2 года назад

    i have change StreamController() to StreamController.broadcast(); which resolved my issue.let me know please is this a right way?

    • @RohitSemriwal
      @RohitSemriwal  2 года назад +1

      Yes, broadcast streams can be listened to more than one time.

    • @abdulrehmananwar6990
      @abdulrehmananwar6990 2 года назад

      Sir i am using tabview its not refresh stream when i change tab

    • @abdulrehmananwar6990
      @abdulrehmananwar6990 2 года назад

      I use two tabs both tabs contains same stream when i update stream and change the tab then new tab dont show updated stream

  • @mustufashahid646
    @mustufashahid646 Год назад

    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.

    • @RohitSemriwal
      @RohitSemriwal  Год назад +1

      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()

    • @mustufashahid646
      @mustufashahid646 Год назад

      @@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?

  • @Js-Lovers
    @Js-Lovers 2 года назад

    can you help me for StreamProvider?

    • @RohitSemriwal
      @RohitSemriwal  2 года назад +2

      What's the issue?

    • @Js-Lovers
      @Js-Lovers 2 года назад +1

      @@RohitSemriwal i don't know how to use that

  • @pankajkhairnar621
    @pankajkhairnar621 Год назад

    Good... but background music is very disturbing...

  • @TrikNgonlen
    @TrikNgonlen 2 года назад

    It would be better if it is in English... ^_^

    • @RohitSemriwal
      @RohitSemriwal  2 года назад

      I'm planning on making a channel in English as well, will notify you when it's done. Thanks for watching 😁

  • @Medos996
    @Medos996 Год назад

    Can you please not put an english title to a video that is in hindi?

    • @RohitSemriwal
      @RohitSemriwal  Год назад +1

      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.