BLoC Pattern with Flutter || State Management

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 2024

ความคิดเห็น • 284

  • @CodeXdev
    @CodeXdev  4 ปีที่แล้ว +41

    I hope you people understood the basic concept, in upcoming video for BLoC I am going to cover some more details like:
    1. Closing Stream 🔚
    2. Single Subscription and Broadcasting 📣🔔
    3. Passing parameter to Sink ➡️ and
    4. Different states of StreamBuilder 🎯

    • @faheemahmad3957
      @faheemahmad3957 ปีที่แล้ว

      brother its no longer useful! please remake a new cubit tutorial and make it best and easy

  • @MUZIXABA
    @MUZIXABA 4 ปีที่แล้ว +81

    I've watched a lot of BLoC tutorials that left me confused. This is the first one that makes sense. Those iPad visualizations helped out a lot. Thanks

  • @SuperAnkursaini
    @SuperAnkursaini 3 ปีที่แล้ว +8

    After watching more than 20 vedios i came here. You are just out of the world. great work man:)

  • @juliusguevarra3729
    @juliusguevarra3729 3 ปีที่แล้ว +6

    Out of all the videos I've watched, this is the only video that made it all clear for me. Very well explained! Thank you! 🙏🏻

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว +2

      Great to hear!

  • @s0mbres
    @s0mbres 2 ปีที่แล้ว +1

    This is easily the best BLoC pattern tutorial for Flutter I've seen, and I've seen a lot of them.

  • @on1235
    @on1235 2 ปีที่แล้ว +3

    Best Bloc Tutorial i watched so far! You make it look less complicated especially when using the Ipad.

    • @CodeXdev
      @CodeXdev  2 ปีที่แล้ว

      Wow, thanks! 😀

  • @mohammedammarkurabi7520
    @mohammedammarkurabi7520 4 ปีที่แล้ว +4

    Great effort... I love you explanation man.
    I did your example step by step and at the end converted the state full widget to stateless widget and every things works just fine.
    You are awesome instructor.

    • @CodeXdev
      @CodeXdev  4 ปีที่แล้ว

      Glad it helped!

  • @JohanLibert-k9g
    @JohanLibert-k9g ปีที่แล้ว

    Man thanks , i've seen many bloc tutorials i didn't get it but ur explanation made so simple and easy

  • @salahuddinshaikh7847
    @salahuddinshaikh7847 3 ปีที่แล้ว +6

    Very clear explanation. Best Explanation out of ALL explanations I have listened to or read. BTW it was really nice to use a simple example and not a complex one. Bcoz of the example you took it became really clear. And the diagrams were really helpful.

  • @عبدالقادرعبدالرحمنعبدالله

    This is the simplest way of understanding such great concept. thank you.

  • @saqib399
    @saqib399 ปีที่แล้ว

    Great Explanation. I was afraid of learning bloc. But your video gave me a good understanding of it. God bless you

  • @lanceolana8277
    @lanceolana8277 2 ปีที่แล้ว

    I've watched so many Bloc toturial here in youtube but youre toturial is the best! Thumbs up :)

    • @CodeXdev
      @CodeXdev  2 ปีที่แล้ว

      Wow, thanks!

  • @RanaAhmed-gr4ub
    @RanaAhmed-gr4ub 2 ปีที่แล้ว +1

    clear explanation of Bloc.Thank you brother

  • @hoangtri9569
    @hoangtri9569 3 ปีที่แล้ว +1

    I'm searching for more than 10 videos, this video is the best of them, great work!

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Glad you liked it!

  • @noshingh521
    @noshingh521 4 ปีที่แล้ว +18

    I saw many videos from bloc pattern, but it’s the best explanation! Thanks. But I have some question.
    Are there any differences from flutter_bloc and bloc Api? And in some videos use another way in bloc class, override initial state and mapToEvent method. Which one is better? Using streamContoller like you explained or another way with using mapToEvent and initialState method in Block class?

  • @anasyousuf485
    @anasyousuf485 2 ปีที่แล้ว

    It's a very good approach that you didn't just directly jumped to an advance example, even the basic example gets complex/advance for any new concept and people need to understand this. Thumbs up 👍

  • @DilwarHossainNoorChandan
    @DilwarHossainNoorChandan 3 ปีที่แล้ว +2

    At last I am clear about BLoC. Love you man.

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Thank you @Dilwar Hossain

  • @abanahmed4683
    @abanahmed4683 3 ปีที่แล้ว +1

    The most super clear explanation

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว +1

      Glad to hear that!

  • @lunaRdeltaY
    @lunaRdeltaY ปีที่แล้ว

    that visual really helps alot, it is straight forward and clear enough to be understood, please make more tutorial using this way, really appreciated, thx sir

  • @hk20092009able
    @hk20092009able ปีที่แล้ว

    Really the first video. Enjoy and understand the bloذ. Thank you for this most wonderful explanation

    • @CodeXdev
      @CodeXdev  ปีที่แล้ว

      You are welcome!

  • @dengbeny
    @dengbeny 3 ปีที่แล้ว

    Thank you. I have been struggling with BloC for a while but now is clear.

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Good to hear that. 😍

  • @autumnuniverse1940
    @autumnuniverse1940 2 ปีที่แล้ว

    You’ve explained BLoC pattern perfectly

  • @swayamshreemohantyvlogs8126
    @swayamshreemohantyvlogs8126 3 ปีที่แล้ว

    Thnaks for this simplest explanation of BLoC pattern.

  • @aaBeben
    @aaBeben 3 ปีที่แล้ว

    U r so comprehensive. Glad be here to learn more.

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Thanks and welcome

  • @higorgustavobarbosadasilva9624
    @higorgustavobarbosadasilva9624 2 ปีที่แล้ว

    this was for me the key that was unfound in my mind. Thanks a lot for your life!!! I'm from Brazil.

    • @CodeXdev
      @CodeXdev  2 ปีที่แล้ว

      You are so welcome!

  • @keanallen
    @keanallen 2 ปีที่แล้ว

    Nice explanation Afzal! Im from GetX, and now I wanted to learn BLoC. This video helps me to get started. Thank you so much!

  • @cjt5570
    @cjt5570 3 ปีที่แล้ว

    I've watched so many BLoC tutorials from US to China but was still struggling to understand it. And this video explained so well that I finally get the concept of BLoC. Thank you so much.
    Say no more. Subscribed. 😃
    ps: Thank you sir you saved me a lot of time, and I am gonna spend some of my time to watch the Ads on your videos. Hope that helps😊

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Thank you so much for the lovely feedback 🥰

  • @himanshukesharwani5333
    @himanshukesharwani5333 3 ปีที่แล้ว

    One of the best explanation of Bloc

  • @Ash-td4sx
    @Ash-td4sx 3 ปีที่แล้ว

    Best explanation for BLoC must say!!

  • @rodinsuniga5549
    @rodinsuniga5549 4 ปีที่แล้ว +3

    Very comprehensive tutorial video! The Ipad Illustration really helped a lot!
    Can you show or give advice on how should we structure our folders and files using BloC?
    thank you very much!

  • @kkatad
    @kkatad 3 ปีที่แล้ว +5

    I watched lot's of tutorial but this one clear by bloc pattern concept. Thank you so much doing this useful tutorial.

    • @miskellil4844
      @miskellil4844 3 ปีที่แล้ว +1

      Me too

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Thank you for your feedback :)

  • @siddheshsonawane3849
    @siddheshsonawane3849 2 ปีที่แล้ว

    best video on BloC state management

  • @poisonels8023
    @poisonels8023 4 ปีที่แล้ว +2

    Thanks very much. More Flutter video please

    • @CodeXdev
      @CodeXdev  4 ปีที่แล้ว +1

      I am on it 😊

  • @jakubpatrik2326
    @jakubpatrik2326 4 ปีที่แล้ว +3

    great, short and understandable tutorial on bloc pattern. I am finally able to explain it further to my friends. :)

    • @CodeXdev
      @CodeXdev  4 ปีที่แล้ว

      Great to hear!

  • @nextebiz6897
    @nextebiz6897 3 ปีที่แล้ว +1

    great video, love from Islamabad, Pakistan.

  • @habuwet
    @habuwet 2 ปีที่แล้ว

    This is the best explanation i have ever watched from many different people videos. Thank you, I will subscribe your channel !! 🔥 🔥

  • @theradioactivemonkey
    @theradioactivemonkey 2 ปีที่แล้ว

    Thank you for this video. BLoC in Flutter finally makes sense :-)

  • @DebugWithAdam
    @DebugWithAdam 3 ปีที่แล้ว

    U just made this concept more clearer to understand, Good work. Thank you

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Glad it was helpful!

  • @desdrianton5993
    @desdrianton5993 3 ปีที่แล้ว

    I've watched so many bloc tutorial.. this is the simplest one... good job 👍

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Thank you 😊

  • @laxmankumar433
    @laxmankumar433 2 ปีที่แล้ว

    You are Amazing Man! I bow for you. Thanks for the great explanation.

  • @anmolkumarshah
    @anmolkumarshah 3 ปีที่แล้ว +3

    he really taught this complex topic well
    i was struggling to understand this

  • @SIDDARTHBHURA
    @SIDDARTHBHURA 4 ปีที่แล้ว

    By Far the best explanation on Bloc Pattern. Thank you .

    • @CodeXdev
      @CodeXdev  4 ปีที่แล้ว

      You're very welcome!

  • @praveenhamal
    @praveenhamal 9 หลายเดือนก่อน

    subscribed just for explaining bloc the simplest way ..keep making similar contents

    • @CodeXdev
      @CodeXdev  9 หลายเดือนก่อน

      Thanks for the sub!

  • @aqibali1909
    @aqibali1909 2 ปีที่แล้ว

    Thank you sir for making this so easy to understand

  • @battleGroundAce832
    @battleGroundAce832 3 ปีที่แล้ว

    Thankyou so much for clearing the concept of bloc. Really so much helpful to me.

  • @venkatareddykunduru1828
    @venkatareddykunduru1828 3 ปีที่แล้ว +1

    Really great explanation what a man are you

  • @mahendrank2567
    @mahendrank2567 3 ปีที่แล้ว

    thank you for your clear explanation

  • @MuhammadFaisal-ey5fr
    @MuhammadFaisal-ey5fr 2 ปีที่แล้ว

    Thanks for the clear and simple explanation! Keep this style of yours in explaining complex things..
    im auto subscribing!

  • @d.developer
    @d.developer 2 ปีที่แล้ว

    First time on you channel and I didn't get disappointment. Now i'm subscribed.

    • @CodeXdev
      @CodeXdev  2 ปีที่แล้ว

      Most welcome 😍 Hope you get value in return

  • @hardiksinhjivansia1244
    @hardiksinhjivansia1244 4 ปีที่แล้ว

    I don't usually comment but
    After trying many videos this is the best video I have come accross.
    Great explanation ( kudos for visual explanation on ipad )

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      So nice of you

  • @stefanomilani9553
    @stefanomilani9553 2 ปีที่แล้ว

    Great explanation, many compliments

  • @shubhamnaik1982
    @shubhamnaik1982 3 ปีที่แล้ว +1

    Nice Explaination, Thanks

  • @muhammaddawood4786
    @muhammaddawood4786 2 ปีที่แล้ว

    Bro you own my subscription by this video, good job 👍

  • @walidwazini7628
    @walidwazini7628 2 ปีที่แล้ว

    Great video, great audio clarity.

  • @sodiqeniola474
    @sodiqeniola474 2 ปีที่แล้ว

    Simply great. Thanks for this, Afzal.

    • @CodeXdev
      @CodeXdev  2 ปีที่แล้ว

      Most welcome, hope you have subscribed ☺️

  • @perilousgourd360
    @perilousgourd360 3 ปีที่แล้ว

    The code at 10:00 looks a bit fishy, but I'm new to this, so may misunderstand. ------------- EDIT: NEVERMIND BC 18:18 -------------
    I would expect that that the first argument for the Text widget should be snapshot.data.toString(), to use the _counter data arriving from the stream. I speculate that this example only works because the updating of the local _counter variable coincides with the entry of data into the stream, with StreamBuilder rebuilding the Text widget every time _counter is incremented (carrying the unused-as-written new _counter data), so that using local variable $_counter directly results in indistinguishable, but conceptually incorrect and unlikely to generalize well, behaviour.
    Happy to be corrected.
    This is my favourite of the BLoC pattern tutorials I've watched so far, by the way. Thank you for creating it :D.

  • @Kerol-channel
    @Kerol-channel 3 ปีที่แล้ว

    Thank you very much for the explanation, very clear and easy to understand, one of the best channel so far

  • @pravinromano8774
    @pravinromano8774 2 ปีที่แล้ว

    Thank you so much brother for such a wonderful tutorial thank you so much

  • @ariuntsetsegmunhtulga3732
    @ariuntsetsegmunhtulga3732 2 ปีที่แล้ว

    Absolutely help me. Thank you so much

  • @saravanan925
    @saravanan925 3 ปีที่แล้ว

    has become a fan of your way of teaching!!! ❤️

  • @gentlepeace-09
    @gentlepeace-09 3 ปีที่แล้ว

    Looking for the perfect explanation .. you very good

  • @eyobedet5144
    @eyobedet5144 3 ปีที่แล้ว +1

    Now I got it, thanks alot.

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว +1

      👍🏼👍🏼 kudos

  • @freeyow4405
    @freeyow4405 2 ปีที่แล้ว

    Awesome explanation

  • @abubakarmani
    @abubakarmani 4 ปีที่แล้ว +1

    good Job

  • @backer_sid
    @backer_sid 4 ปีที่แล้ว

    Best bloc explanation ever....👍🏽

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Wow, thanks @Backer!

  • @user-mb7qe6ro9m
    @user-mb7qe6ro9m 4 ปีที่แล้ว +1

    finally I understood it, thanks so much man. just a suggestion, remove dos transitions it break the flow.

    • @CodeXdev
      @CodeXdev  4 ปีที่แล้ว

      I m glad it helped you. Regarding transitions, I already got many suggestions 🤓

  • @supun_sandaruwan
    @supun_sandaruwan 2 ปีที่แล้ว

    Those iPad visualizations helped out a lot. Please do explanation like that in future videos. Great sir 🔥♥

    • @CodeXdev
      @CodeXdev  2 ปีที่แล้ว +1

      Thanks, will do!

  • @olishiz
    @olishiz 3 ปีที่แล้ว

    You definitely has the most aesthetic handwriting on your iPad lol. And I love how you explain it fully till the end to deliver your message. Subscribed to you. Thanks! Had trouble understanding BLOC and state management for mobile apps haha

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Thank you so much 😀 iPad idea really worked out for many. I think i should do more explanation videos using iPad 👨🏻‍💻📲

  • @marco_di
    @marco_di 4 ปีที่แล้ว +1

    The best BLoC tutorial ever :-) I'm looking forward for your next lessons :-)

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Wow, thanks!

  • @RaselKhan-ds7nc
    @RaselKhan-ds7nc 4 ปีที่แล้ว +2

    Alhamdulillah. Now I am clear on BP
    Thank you bro

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Happy to help

  • @tejasgalande4557
    @tejasgalande4557 ปีที่แล้ว

    you had explained well.

  • @mithuns8410
    @mithuns8410 2 ปีที่แล้ว

    Thanks for your tutorial, may i know which package should be added for achieving this?

    • @CodeXdev
      @CodeXdev  2 ปีที่แล้ว

      This is inbuilt, you dont need any package 📦

  • @PasinduBroomer
    @PasinduBroomer 2 ปีที่แล้ว

    only tutorial i understood thanks alot man

    • @CodeXdev
      @CodeXdev  2 ปีที่แล้ว

      Seriously! What other tutorials you have seen ?

  • @MuhammadUmair001
    @MuhammadUmair001 3 ปีที่แล้ว

    very nice brother, May Allah swt bless you

  • @dino2009ify
    @dino2009ify ปีที่แล้ว

    Very good lesson, thank you, but I don't understand one thing: when you put in enum Increment, Decrement and Reset, how you do this? Because when I do the same, the program don't show me this classes, in green color, it has blue color like parameters.

  • @mohdraghib2769
    @mohdraghib2769 7 หลายเดือนก่อน

    Please make tutorial on Riverpod as well.
    Thanks

  • @chndraja
    @chndraja 3 ปีที่แล้ว +1

    Hey Afzal, thanks for this video.

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว +1

      My pleasure

  • @abhishekjain3383
    @abhishekjain3383 4 ปีที่แล้ว

    Thank you so much. First time I understand the bloc pattern perfectly.. 😍🙌

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      You are welcome 😊

  • @francescofreddi4374
    @francescofreddi4374 4 ปีที่แล้ว

    at min 9:20 more or less... for explain idea better (because i noticed that later on); is better to write: counterBloc.counterSink.add(0);
    So is very very clear to understand whats going on!! and why all process dont call another times build part!!!!!
    I didn't understand right away! For me is a core part of that lesson; that is many different from many more other lessons

  • @samyaahmed6972
    @samyaahmed6972 3 ปีที่แล้ว

    Excellent explanation! Both thumbs up. Thank you.

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Thank you😍

  • @gunasekaranpalanisami6182
    @gunasekaranpalanisami6182 3 ปีที่แล้ว

    Nice with ipad explanations ...

  • @seetheworld3839
    @seetheworld3839 7 หลายเดือนก่อน

    Damn! That was some really well explained explanation❤

  • @developermaniax
    @developermaniax 2 ปีที่แล้ว

    Thank you for this awesome video you saved my day! 🍻

  • @kevinalbrecht5575
    @kevinalbrecht5575 3 ปีที่แล้ว

    Hi, nice video, good explainations, thought you forgot to talk about closing then I saw the part two. thanks dude

  • @VijayAdhithyaramasamy
    @VijayAdhithyaramasamy 3 ปีที่แล้ว

    very nice video got it easily

  • @faisalmushtaq2287
    @faisalmushtaq2287 4 ปีที่แล้ว +1

    Best tutorial ever!!!!

  • @Grovermol
    @Grovermol 4 ปีที่แล้ว +1

    Nice tutorial, thanks!, i'm already looking forward the next login bloc tutorial.

    • @CodeXdev
      @CodeXdev  4 ปีที่แล้ว

      Coming soon!

  • @farhanahmad-bv1mx
    @farhanahmad-bv1mx 2 ปีที่แล้ว

    Better explaination

  • @trextyrans
    @trextyrans 2 ปีที่แล้ว

    Love it so much!!!...easy to understand explanations.

  • @rodrickvy
    @rodrickvy 2 ปีที่แล้ว

    great explanation, but I dont understand why we need the second streamcontroller for events? Is it to establish a boundary layer? If thats the case wouldnt hiding the sink variable and only exposing a method work? Just feels like adding more streams =more chances of errors, am I missing something here? Why do we need it?

  • @Nam-ug5jp
    @Nam-ug5jp 3 ปีที่แล้ว +1

    This is what i need. Thank you!

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      Glad it helped!

  • @FarmanUllahYousafzai485
    @FarmanUllahYousafzai485 4 ปีที่แล้ว +1

    thanks a lot

  • @edungdivinefavour6977
    @edungdivinefavour6977 3 ปีที่แล้ว

    Man i want to subscribe again and again

  • @farhanahmad-bv1mx
    @farhanahmad-bv1mx 2 ปีที่แล้ว

    Wonderful

  • @olehhromadskyi2532
    @olehhromadskyi2532 3 ปีที่แล้ว

    Thank you, very cool video

  • @adeelzahid9622
    @adeelzahid9622 3 ปีที่แล้ว

    very appreciated. You make it easier. ✌️👍

  • @madhumakhija3720
    @madhumakhija3720 2 ปีที่แล้ว

    Very nice and clear video out of all which I have watched but I have question, as you explained and implemented counter example in bloc pattern using stream controller but this is also possible with using events and state classes, or mapEventToState method, or copyWith method. Can you please explained me which one is better and difference between this. And which one is used while developing app with bloc pattern.

  • @chinnaswamyreddy3828
    @chinnaswamyreddy3828 3 ปีที่แล้ว

    sir super sir perfect explanation
    in the same way you should do full flutter course

  • @PaWLO1501
    @PaWLO1501 3 ปีที่แล้ว

    Very good way of sharing your knowledge !

    • @CodeXdev
      @CodeXdev  3 ปีที่แล้ว

      It's my pleasure

  • @ahamedalvi1218
    @ahamedalvi1218 3 ปีที่แล้ว

    Bro you are awesome keep it up. Thank you