BLoC Pattern with Flutter || State Management (Part 2)

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

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

  • @lobemusonda952
    @lobemusonda952 3 года назад +7

    I looked at a number of videos about state management and BLoC, your video showed me everything I needed

  • @aizazahmad8138
    @aizazahmad8138 4 года назад +6

    Great, I watched lots of videos about flutter bloc but didn't understand. but your videos did magic. the best way of teaching. I appreciate this and Thanks

    • @breadknyf
      @breadknyf 3 года назад +1

      me too. watched one somewhere (Wont say the channel) and the guy was copying and pasting codes and i was lost over and over. yours is good and with pictures. God bless you

    • @aizazahmad8138
      @aizazahmad8138 3 года назад

      @@breadknyf brother my comment was of 4 months ago.. now i learnt alot and made large projects 😁🤗😜

    • @breadknyf
      @breadknyf 3 года назад +1

      @@aizazahmad8138 Great bro. Good for you!

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

    you are the only guy who can teach this!!!!!! any RUclipsr can't do this I've seen them all, Google should recommend you on this topic

    • @CodeXdev
      @CodeXdev  4 года назад

      OMG.. most overwhelming comment! Thank you so much and I am glad that my teaching method is liked by many...

    • @mydrama6980
      @mydrama6980 4 года назад +1

      @@CodeXdev you explain every detail that's why most people like your teaching method, Please do this always, you deserve a million views

    • @mitheshmedia3355
      @mitheshmedia3355 4 года назад

      @@mydrama6980 Exactly!!

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

    one word to say !! this is the best tutorial on bloc. Its very simple and easily understandable.

  • @m_miko
    @m_miko 3 года назад +6

    The most quality content i have seen so far thanks for doing this.

  • @adeelzahid9622
    @adeelzahid9622 3 года назад +5

    I was struggling to understand what is BLOC, after watching 1st part i feel confident and now i feel GLAD because now I am able to implement it in my project. Thanks. ✌️👍. You make it very easier for us. very appreciated.

  • @АлександрИнженер-д4б
    @АлександрИнженер-д4б 4 года назад +1

    You good. The best flutter man in India!

  • @fahadmustafa650
    @fahadmustafa650 7 месяцев назад

    you are incredible dude. make that complex topic look like a piece of cake.

  • @md.ruhulamin7963
    @md.ruhulamin7963 4 года назад +1

    Thank you sir. This is very simple and easy to understand. Now BLoC pattern concept is clear.

  • @swayamshreemohantyvlogs8126
    @swayamshreemohantyvlogs8126 3 года назад +4

    Awesome explanation. Such a great teacher in Flutter.

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

    This is the best tutorial on bloc

  • @AnkitSharma-ez9js
    @AnkitSharma-ez9js 2 года назад

    Finally I understood BloC. Thanks buddy!

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

    First video with 4K resolution Which resolution you people watch in?

  • @meetpanchal8809
    @meetpanchal8809 3 года назад

    you explained this bloc state management very well.

  • @simranyadav8131
    @simranyadav8131 4 года назад +1

    Thankyou for making us understand in a easy way. Great job

    • @CodeXdev
      @CodeXdev  4 года назад

      @Simran Yadav, appreciate your feedback! 👍

  • @techandroid2845
    @techandroid2845 3 года назад

    Thank you sir I am understanding better now from this tutorial about bloc pattern keep add more videos on bloc pattern

  • @本名出さない設定
    @本名出さない設定 2 года назад

    Thanks from Japan.
    your video is very useful to me.
    thank you very much
    most useful when studying bloc
    sorry, my english is poor

  • @arbazadam3407
    @arbazadam3407 3 года назад +4

    I appreciate your efforts for making a video on a complex topic like BLoC. Part 1 of this was mind blowing. However this one was not upto the mark because of too much copy pasting of the code....

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

    This video is amazing sir, thanks for the tutorial!

  • @rushidalvi5895
    @rushidalvi5895 3 года назад

    best explanation ever

  • @Alex-ve4wr
    @Alex-ve4wr 3 года назад

    very good explanation, thanks

  • @garoono
    @garoono 4 года назад +6

    hey Cody can you make a video on flutter_bloc package usage ? Thanks in advance :D

  • @AbhaySharmaVlogsandMusic
    @AbhaySharmaVlogsandMusic 3 года назад +1

    This Video Helped a Lot.

  • @teeratphoowaborwornphimkul3501
    @teeratphoowaborwornphimkul3501 3 года назад

    Same Best Value & Same Great tutorial ...... Man !!!

  • @aizazahmad8138
    @aizazahmad8138 4 года назад +1

    Please another video on the BLOC pattern using Bloc library with firestore .

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

    Please make video about (stream, sink) vs (event, states) whats is difference between and when to use

  • @RamKumar-zf5cl
    @RamKumar-zf5cl 4 года назад +1

    Great explanation brother 😊😊😊😊Thanks a lot 😊😊

  • @saswatsaubhagyarout3480
    @saswatsaubhagyarout3480 4 года назад +1

    Thanks for this nice video. Please make some video on flutter_bloc for complex application,not for todo type of thing

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

    Could you provide code sample of your bloc implementation of this example? i can't find it in your github, thanks

  • @karunjithm3662
    @karunjithm3662 4 года назад

    just learned what's bloc. Thank You so much.

    • @CodeXdev
      @CodeXdev  4 года назад

      🥳🥳🥳 make sure to watch 1st part as well

  • @rishadbaniya1679
    @rishadbaniya1679 4 года назад +4

    Bro awesome..i wanted to learn bout cubit also ❤️plz teach

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

    Awesome Video brother. Love from Pakistan.

  • @edungdivinefavour6977
    @edungdivinefavour6977 3 года назад

    Super super useful!!!!!!

  • @ahmeedev
    @ahmeedev 3 года назад

    I love the way you teach us

  • @vishakhadikshit3824
    @vishakhadikshit3824 3 года назад

    Really Helpful.

  • @sovaranimallick3237
    @sovaranimallick3237 3 года назад +1

    Please another video on the BLOC pattern for Tab Bar view using API

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

    Very helpful video thanks

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

      Glad it was helpful!

  • @AamirKhan-zy5yt
    @AamirKhan-zy5yt 4 года назад +1

    want more on BLoC 😍

  • @pranthonyaquino
    @pranthonyaquino 3 года назад

    Excellent content!

  • @achyut_ft
    @achyut_ft 3 года назад

    Great video bro...please do a video on which is the best approach .Providers vs Bloc vs GetX Vs Redux

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

    One thing I would like to suggest is instead of using if else why don’t use switch case that will be helpful to manage all the case easily and in future any new case gets added it becomes easier to manage to that case quickly

  • @aserlink
    @aserlink 4 года назад +1

    This is really nice... how can we integrate this with Cubit instead of Bloc?

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

    i have a question, when i run the flutter code, why running gradle task takes so long. i takes around 30minutes to build and run, please tell me

  • @lamyaarady4514
    @lamyaarady4514 3 года назад

    Just awesome

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

    You got a sub❤️

  • @salmanbehen4384
    @salmanbehen4384 3 года назад +1

    Hey, can you please make a tutorial on the flutter_bloc library as well?

  • @sanchitsaran8834
    @sanchitsaran8834 4 года назад +1

    YES SIR ALSO DO MAKE GETX TUTORIAL

    • @CodeXdev
      @CodeXdev  4 года назад

      Yes @Sanchit, I am preparing tutorial for that.. hope this weekend I will upload.

  • @larssonk22
    @larssonk22 3 года назад +1

    what if you need to pass an object with the sink call? For example remove an article from your feed, you'd want to be able to send an id. Then retrieve and updated list of articles minus the one you removed.

    • @CodeXdev
      @CodeXdev  3 года назад

      Sure, in sink you can add int also.. you can pass the event as remove and id to be removed. Give it a try, if you face issue please connect on discord

  • @mitheshmedia3355
    @mitheshmedia3355 4 года назад

    Bro...thank u so much for the wonderful video. I am from Kerala. You got another subscriber.!!!! :) I will follow ur channel to learn more about flutter.

    • @CodeXdev
      @CodeXdev  4 года назад +1

      Thanks and welcome

  • @sanchitsaran8834
    @sanchitsaran8834 4 года назад +3

    SIR PLZ MAKE A VIDEO FOR GOOGLE MAPS IN FLUTTER

  • @saitejd8108
    @saitejd8108 3 года назад

    Very good explanation.
    I have been searching for a problem it will be very helpful for me if you can give me some solution. That is just like in some dating apps like bumble, tinder how can we actually store the results from the API we get even after we navigate to other screen and come back. I have used future builder for future variable I've created some other variables and stored the results from API. It helps me not fire the future when I rebuild the widget using setstate. But when I navigate to some screen and comes back the future fires again and gets me the same result. What I want is need to call the API only when user start the app and use it for the whole time until he closes it. Thank you.

  • @BrYarDJ
    @BrYarDJ 4 года назад +1

    thanks for your TU bro.

  • @Nisa-Julie
    @Nisa-Julie 3 года назад

    Amazing I found the good one

  • @jontysingh4334
    @jontysingh4334 3 года назад

    Thanks buddy

  • @PraveenGongada
    @PraveenGongada 3 года назад +1

    I am getting this error pls help
    Expected a value of type 'Stream', but got one of type '_ControllerStream'

    • @CodeXdev
      @CodeXdev  3 года назад +1

      you are using wrong value in the StreamBuilder, it should be the stream from stream controller.

    • @PraveenGongada
      @PraveenGongada 3 года назад +1

      @@CodeXdev I Found that 😅
      Thanks for replying, BTW your explanation was Solid

  • @larssonk22
    @larssonk22 3 года назад

    17:36 How do you get the options to surround code with? I don't have the option with VSCode

    • @CodeXdev
      @CodeXdev  3 года назад

      for VS Code its CMD + . (dot) or simply click on the bulb icon on the left side

  • @shahrearbinamin9943
    @shahrearbinamin9943 3 года назад

    How can I pass additional data in the eventSink along with the action?

  • @TheTahmeed
    @TheTahmeed 3 года назад

    Error: The argument type 'List?' can't be assigned to the parameter type 'List'.

  • @simplegirl2218
    @simplegirl2218 4 года назад

    Great video, I'm getting warning saying ' Close instances of `dart.core.Sink' even i have closed the stream in dispose method.And also for one stream iam getting the exception :The getter _stream is called on null receiver null.What could be the issue!? And please make a video on Redux library as well. Thanks for great video.

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

    Hi mate, I watched your previous video about getx which doesn't need any stateful widget. which one is more memory-friendly? in your opinion? this one using stateful widget, or getx without stateful widget?

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

      Stateless is preferred, GetX will manage state for you.
      But sometime you need your UI to react for some reason, implementing GetX equivalent for that may bring more complexity. So you can use StatefulWidget.
      I prefer to follow standards but keeping it simple at the same time.

  • @vaidarbhicontractor6712
    @vaidarbhicontractor6712 3 года назад +1

    Sir please put a video related login with facebook and login with google with page redirection.

  • @swostikgautam5836
    @swostikgautam5836 4 года назад +1

    want more about bloc and cubit

  • @mahendrank2567
    @mahendrank2567 3 года назад

    which architecture is used in this example?

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

    Hi really amazing tutorial. I am trying to debug my code since 4 days but unable to remove the error. COuld you please help me out

    • @CodeXdev
      @CodeXdev  3 года назад

      Sure, please send me the details.

  • @dangdatraymonddelmut3230
    @dangdatraymonddelmut3230 4 года назад

    You are good

  • @raiyanbinmohsin237
    @raiyanbinmohsin237 4 года назад

    Is the flutter clock series finished?

  • @matthewslaton1366
    @matthewslaton1366 3 года назад

    good teaching, what do you do if you want to listen to it again later on? like if it was used for a chat, then you close it, but then later on want to open it back up, what's the best way to do that?

    • @CodeXdev
      @CodeXdev  3 года назад +1

      For continuous listening you can use broadcast

    • @matthewslaton1366
      @matthewslaton1366 3 года назад

      @@CodeXdev okay, so it's okay to leave it open for updates and stuff?

    • @CodeXdev
      @CodeXdev  3 года назад +1

      Yes, in chat applications or places where you will be receiving data continuously

    • @matthewslaton1366
      @matthewslaton1366 3 года назад

      @@CodeXdev okay great, thank you

  • @creegplay
    @creegplay 4 года назад +1

    How to do to maintain global state if you want to have independent widgets?

    • @shafah5383
      @shafah5383 4 года назад

      Did you get the code to maintain the global state

  • @oijgg3p
    @oijgg3p 4 года назад

    Awesome video.. do you know how can we use bools with our bloc? For example, how could we use int counter on other pages as Stream builder value.. I am trying to place bool there and make a toggle button, but with no luck

    • @CodeXdev
      @CodeXdev  4 года назад

      @Nooks, thank you for feedback. Yes, you can use any data type you want including primitive and custom models. I doubt your state stream controller is not correctly set with bool type.. it should work straight forward.

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

    Kindly make a video on flutter_bloc package in detail

  • @bernardosuede9586
    @bernardosuede9586 3 года назад

    Super

  • @ksreenivas3933
    @ksreenivas3933 3 года назад

    What if we want to call delete and need to pass value to it..

  • @ankitmehta3561
    @ankitmehta3561 3 года назад

    Can you please tell me when to use BloC pattern and when to use Provider?

  • @AmarjeetKumar-cg5de
    @AmarjeetKumar-cg5de 4 года назад

    Bro please make a video on getX, we really need that

  • @WikkiOnIlluminati
    @WikkiOnIlluminati 4 года назад

    can you add pagination event into this..?

  • @takiuddin93
    @takiuddin93 4 года назад

    what is the difference between calling counterBLoC.counterStream vs counterBLoC.eventStream in the StreamBuilder?

    • @CodeXdev
      @CodeXdev  4 года назад

      Event stream is for sending commands to controller, counter stream is to do the actual job based on event..

  • @georgemendle5587
    @georgemendle5587 4 года назад

    Hey which font you are using in your vs ide

    • @CodeXdev
      @CodeXdev  4 года назад +1

      VS Code says -> *Menlo, Monaco, 'Courier New', monospace* I think these are defaults.
      Yes, I changed font size to 20 so that all can see properly even on low resolution 👍

    • @georgemendle5587
      @georgemendle5587 4 года назад +1

      @@CodeXdev thanks. Your workspace design is awesome.

  • @asifali-mr2lv
    @asifali-mr2lv 4 года назад

    Subscribed ❤️

  • @rishadbaniya1679
    @rishadbaniya1679 4 года назад

    I also want to know when should i dispose the stream..i mean..when how can i know i have used it

    • @CodeXdev
      @CodeXdev  4 года назад

      If you don't know actual case, then dispose it on Page dispose method... Or if you know when job is done, like payment transactions or something you can dispose manually.

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

    Can you explain how this line works in your code with out using Uri.parse ?
    var response = await client.get(url);
    vs
    var response = await client.get(Uri.Parse(url));

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

      Because my http library was older, that time it was supporting direct String as url

  • @techandroid2845
    @techandroid2845 3 года назад

    Sir How can we handle click event in bloc pattern ?

    • @CodeXdev
      @CodeXdev  3 года назад +1

      I have mentioned in tutorial.. you can just call method from BLoC or pass parameters

    • @techandroid2845
      @techandroid2845 3 года назад

      @@CodeXdev Thank you😍

  • @krishnaSharma-uq2ne
    @krishnaSharma-uq2ne 4 года назад +1

    Please make a tutorial on P2P based file sharing app

    • @CodeXdev
      @CodeXdev  4 года назад +1

      It won't be a tutorial then, it will become full fledge project

    • @krishnaSharma-uq2ne
      @krishnaSharma-uq2ne 4 года назад +1

      @@CodeXdev can you please make It want to learn

  • @rishadbaniya1679
    @rishadbaniya1679 4 года назад

    Can i use singleton pattern..to use a bloc..like..i wanna..have whole app runnning in single instance of bloc..reply bro😿❤️❤️

    • @CodeXdev
      @CodeXdev  4 года назад

      Why not, you can create StreamBuilder with Singleton pattern as well..

  • @ekopurnomo9221
    @ekopurnomo9221 4 года назад

    what emulator you use ?

    • @CodeXdev
      @CodeXdev  4 года назад

      In this video, I was running on iPhone 11 Pro Max simulator📱

  • @francescofreddi4374
    @francescofreddi4374 4 года назад +1

    whats difference about Stream and StreamSink?

    • @CodeXdev
      @CodeXdev  4 года назад

      StreamSink is input and Stream is output

    • @francescofreddi4374
      @francescofreddi4374 4 года назад

      ​@@CodeXdev EscuseME.... want i mean... difference between sink and StreamSink.... :) :)
      ahhhhahaha i wrong to write!

    • @CodeXdev
      @CodeXdev  4 года назад

      😀😀😆 sink is property name and StreamSink is type.. And you already know the use-to capture input. 👍

    • @francescofreddi4374
      @francescofreddi4374 4 года назад

      @@CodeXdev mmmmm yesssss i try to understand your point of view...
      when i need to add something in a pipe i use:
      Function(String) get name => _.sink.add;
      and for "output":
      Stream get name2 => _.stream.transform(_);
      when i need to add, in widget tree i use onPress: name, and send function on the widget that i create somewhere in other file
      i try to understand where use StreamSink!! really! is first time that i see :) :)
      (no, second... last week i see that on your first video)

    • @francescofreddi4374
      @francescofreddi4374 4 года назад +1

      okeyyyyy i understand the problem!!! thankSoMuchForYourVideos!!!!!!!!!

  • @shinehtetaung771
    @shinehtetaung771 4 года назад

    Part 2 have in GitHub? I can'ot fine!Pls

    • @CodeXdev
      @CodeXdev  4 года назад

      nope, it's not in Git. Simple explanation only, thats why.

  • @Manikandan-qc7ei
    @Manikandan-qc7ei 4 года назад

    Which is best providers or bloc?.

    • @CodeXdev
      @CodeXdev  4 года назад +1

      Provider is recommended by Flutter.. but, it really matters what suits you well :)

    • @Manikandan-qc7ei
      @Manikandan-qc7ei 4 года назад

      @@CodeXdev thank you.

  • @aashiqui8707
    @aashiqui8707 3 года назад

    Share Code link...

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

    😇

  • @Sonu-wi9ne
    @Sonu-wi9ne 3 года назад

    It doesn't work with listview.builder

  • @sreejithm3213
    @sreejithm3213 4 года назад

    Source code ?

  • @rishadbaniya1679
    @rishadbaniya1679 4 года назад

    Animation complete masterclass bro for free❤️❤️plzzz❤️❤️❤️😿add it wanna..learn..animation with full concept❤️❤️😿😿😿

    • @CodeXdev
      @CodeXdev  4 года назад +1

      Overwhelmed with your comments.. ;)

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

    For anyone who watch this in 2022, this tutorial no longer works and requires many modifications regarding to the null safety.

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

      I should create another video with null safety and bloc package, what you say?

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

      @@CodeXdev Yes, please do! that will help me a lot and perhaps others.

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

      @@CodeXdev yup please do

  • @amishamelitte2348
    @amishamelitte2348 2 месяца назад

    hey today is 5th september😅

    • @CodeXdev
      @CodeXdev  2 месяца назад

      4 years to this video.. still people are watching 😜

  • @rishadbaniya1679
    @rishadbaniya1679 4 года назад

    Bro there is no proper tutorial...for animation from very basics..like..complete masterclass..please take.your time and add too..bro❤️will be kind from.you

    • @CodeXdev
      @CodeXdev  4 года назад

      There are tutorials for animations, but of course I am going to plan to create series of video on Animation as its one of the most requested topic for Flutter. I can not give date, bt yes.. very soon :)

  • @TheTahmeed
    @TheTahmeed 3 года назад

    Getting so much error on Model Class. Maybe the reason is the new Null-Safety (Flutter v2.2.1). I had created the class from the website you called quicktype.io
    Please give me some idea about this topic. Thanks. And by the way, I am your big fan. Thanks a lot for your videos.

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

    one word to say !! this is the best tutorial on bloc. Its very simple and easily understandable.