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

Поділитися
Вставка
  • Опубліковано 7 вер 2024

КОМЕНТАРІ • 153

  • @harikrishnak6168
    @harikrishnak6168 Рік тому +1

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

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

  • @lobemusonda952
    @lobemusonda952 3 роки тому +7

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

  • @mydrama6980
    @mydrama6980 4 роки тому +2

    you are the only guy who can teach this!!!!!! any UA-camr 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!!

  • @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.

  • @fahadmustafa650
    @fahadmustafa650 4 місяці тому

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

  • @m_miko
    @m_miko 3 роки тому +6

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

  • @qaimraza7239
    @qaimraza7239 2 роки тому

    This is the best tutorial on bloc

  • @user-tv4kh4pc7s
    @user-tv4kh4pc7s 3 роки тому +1

    You good. The best flutter man in India!

  • @md.ruhulamin7963
    @md.ruhulamin7963 3 роки тому +1

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

  • @swayamshreemohantyvlogs8126
    @swayamshreemohantyvlogs8126 2 роки тому +4

    Awesome explanation. Such a great teacher in Flutter.

  • @user-hr6gh9us4s
    @user-hr6gh9us4s 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

  • @rushidalvi5895
    @rushidalvi5895 2 роки тому

    best explanation ever

  • @Alex-ve4wr
    @Alex-ve4wr 2 роки тому

    very good explanation, thanks

  • @simranyadav8131
    @simranyadav8131 3 роки тому +1

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

    • @CodeXdev
      @CodeXdev  3 роки тому

      @Simran Yadav, appreciate your feedback! 👍

  • @AnkitSharma-ez9js
    @AnkitSharma-ez9js 2 роки тому

    Finally I understood BloC. Thanks buddy!

  • @meetpanchal8809
    @meetpanchal8809 3 роки тому

    you explained this bloc state management very well.

  • @vishakhadikshit3824
    @vishakhadikshit3824 2 роки тому

    Really Helpful.

  • @CodeXdev
    @CodeXdev  4 роки тому +2

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

  • @uditswaroopa5809
    @uditswaroopa5809 3 роки тому +2

    This video is amazing sir, thanks for the tutorial!

  • @edungdivinefavour6977
    @edungdivinefavour6977 3 роки тому

    Super super useful!!!!!!

  • @techandroid2845
    @techandroid2845 3 роки тому

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

  • @aizazahmad8138
    @aizazahmad8138 4 роки тому +1

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

  • @AbhaySharmaVlogsandMusic
    @AbhaySharmaVlogsandMusic 3 роки тому +1

    This Video Helped a Lot.

  • @RamKumar-zf5cl
    @RamKumar-zf5cl 4 роки тому +1

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

  • @mateenmehmood5675
    @mateenmehmood5675 2 роки тому

    Awesome Video brother. Love from Pakistan.

  • @teeratphoowaborwornphimkul3501
    @teeratphoowaborwornphimkul3501 3 роки тому

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

  • @virenjoshi2994
    @virenjoshi2994 2 роки тому

    Very helpful video thanks

    • @CodeXdev
      @CodeXdev  2 роки тому

      Glad it was helpful!

  • @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.

  • @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....

  • @karunjithm3662
    @karunjithm3662 4 роки тому

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

    • @CodeXdev
      @CodeXdev  4 роки тому

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

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

  • @rishadbaniya1679
    @rishadbaniya1679 4 роки тому +4

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

  • @arun18066
    @arun18066 9 місяців тому

    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

  • @pravinnichal8147
    @pravinnichal8147 4 роки тому +2

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

  • @AamirKhan-zy5yt
    @AamirKhan-zy5yt 4 роки тому +1

    want more on BLoC 😍

  • @harshbarnwal1879
    @harshbarnwal1879 3 роки тому +2

    You got a sub❤️

  • @ahmeedev
    @ahmeedev 3 роки тому

    I love the way you teach us

  • @jontysingh4334
    @jontysingh4334 2 роки тому

    Thanks buddy

  • @pranthonyaquino
    @pranthonyaquino 3 роки тому

    Excellent content!

  • @dangdatraymonddelmut3230
    @dangdatraymonddelmut3230 3 роки тому

    You are good

  • @sovaranimallick3237
    @sovaranimallick3237 3 роки тому +1

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

  • @garoono
    @garoono 4 роки тому +6

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

  • @lamyaarady4514
    @lamyaarady4514 3 роки тому

    Just awesome

  • @bernardosuede9586
    @bernardosuede9586 2 роки тому

    Super

  • @BrYarDJ
    @BrYarDJ 4 роки тому +1

    thanks for your TU bro.

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

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

  • @creegplay
    @creegplay 3 роки тому +1

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

    • @shafah5383
      @shafah5383 3 роки тому

      Did you get the code to maintain the global state

  • @Nisa-Julie
    @Nisa-Julie 3 роки тому

    Amazing I found the good one

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

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

  • @sanchitsaran8834
    @sanchitsaran8834 4 роки тому +3

    SIR PLZ MAKE A VIDEO FOR GOOGLE MAPS IN FLUTTER

  • @salmanbehen4384
    @salmanbehen4384 3 роки тому +1

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

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

  • @qaimraza7239
    @qaimraza7239 2 роки тому

    Kindly make a video on flutter_bloc package in detail

  • @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.

  • @kodeSchool
    @kodeSchool 3 роки тому

    can you please make a video for Post request which takes body. I have done this with Provider but I want to do it using bloc pattern.

  • @aserlink
    @aserlink 3 роки тому +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

  • @TheTahmeed
    @TheTahmeed 3 роки тому

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

  • @brcglog3808
    @brcglog3808 Рік тому

    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  Рік тому

      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.

  • @asifali-mr2lv
    @asifali-mr2lv 4 роки тому

    Subscribed ❤️

  • @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.

  • @ksreenivas3933
    @ksreenivas3933 3 роки тому

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

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

  • @simplegirl2218
    @simplegirl2218 3 роки тому

    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.

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

  • @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.

  • @mahendrank2567
    @mahendrank2567 3 роки тому

    which architecture is used in this example?

  • @AmarjeetKumar-cg5de
    @AmarjeetKumar-cg5de 4 роки тому

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

  • @ankitmehta3561
    @ankitmehta3561 2 роки тому

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

  • @shahrearbinamin9943
    @shahrearbinamin9943 3 роки тому

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

  • @takiuddin93
    @takiuddin93 3 роки тому

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

    • @CodeXdev
      @CodeXdev  3 роки тому

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

  • @prathivar6721
    @prathivar6721 2 роки тому

    😇

  • @WikkiOnIlluminati
    @WikkiOnIlluminati 3 роки тому

    can you add pagination event into this..?

  • @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.

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

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

  • @raiyanbinmohsin237
    @raiyanbinmohsin237 4 роки тому

    Is the flutter clock series finished?

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

  • @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😍

  • @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..

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

  • @Sonu-wi9ne
    @Sonu-wi9ne 3 роки тому

    It doesn't work with listview.builder

  • @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.

  • @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.

  • @aashiqui8707
    @aashiqui8707 3 роки тому

    Share Code link...

  • @shinehtetaung771
    @shinehtetaung771 3 роки тому

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

    • @CodeXdev
      @CodeXdev  3 роки тому

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

  • @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.. ;)

  • @ekopurnomo9221
    @ekopurnomo9221 4 роки тому

    what emulator you use ?

    • @CodeXdev
      @CodeXdev  4 роки тому

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

  • @amishamelitte2348
    @amishamelitte2348 3 дні тому

    hey today is 5th september😅

    • @CodeXdev
      @CodeXdev  3 дні тому

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

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

  • @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.

  • @udaysuddhala3512
    @udaysuddhala3512 3 роки тому +2

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