КОМЕНТАРІ •

  • @ResoCoder
    @ResoCoder 4 роки тому +5

    🚨 Check out the tutorial covering the newest version of the Bloc package:
    ua-cam.com/video/y564ETOCog8/v-deo.html

  • @norwegiancamper2800
    @norwegiancamper2800 3 місяці тому

    I’ve been searching UA-cam for days trying to find a good, simple, and straightforward Flutter BLOC tutorial with no luck, until I found this one. Absolutely perfect! 👌

  • @samrystrom3532
    @samrystrom3532 5 років тому +24

    This is the simplest, most elegant explanation of BLOC I've seen by a considerable margin. Thank you so much for the great tutorial!

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

    This is arguably the best tutorial on Bloc Library.

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

    This is the simplest, most elegant explanation of BLOC I've seen. Thanks Reso coder 👍

  • @goth14wx47
    @goth14wx47 5 років тому +3

    Thanks seriously thank you a lot, I have been looking for understanding this, and know I feel more comfortable working with flutter.

  • @davidkanai6944
    @davidkanai6944 5 років тому +1

    the quality of your tutorials is magnificent

  • @RobertWildling
    @RobertWildling 5 років тому +6

    Thank you very much for another great tutorial! Would love to see a more complex scenario, one that, e.g., also handles navigation and/or routes...

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

    thanks, a very concise and clean way to introduce to the implementation that I hadn't found easily anywhere else.

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

    This really makes me feel a bit more comfortable starting bloc. Thank you for sharing

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

    Ooh my !! My my !!!! What an explanation ? What an example ,what a theme ,what ... This is the best explanation I have ever come across ! Thanks much sir for this tutorial.

  • @sudesh6807
    @sudesh6807 5 років тому +2

    wow... thanks man, was expecting a tutorial with this library.👌

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

    Look forward to using this in my app soon! Thank you for explaining it so well as it's going to help a lot.

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

    Thanks for tutorial. Finally I got the idea and implementing cases of bloc pattern.

  • @davenash1547
    @davenash1547 5 років тому +7

    I’m new to Flutter, and had overlooked BLoC ‘til now. Everything else I’d seen scared me away. This tutorial was so clear, and BLoC seems so intuitive to my way of thinking, I’m going to try it out. Thank you!

  • @shoaibahmad6910
    @shoaibahmad6910 5 років тому +2

    BloC is just love and also the way you described it!

    • @ResoCoder
      @ResoCoder 5 років тому +1

      Bloc is love, Bloc is life!

  • @kentoapps
    @kentoapps 5 років тому

    This is an awesome tutorial! The written one is also very helpful.
    Apparently, from flutter_bloc 0.17.0, BlocProvider disposes provided blocs automatically.
    And if you define generic types to BlocListener and BlocProvider, you don't need to pass a bloc object.

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

    Great tutorial on BloC!!

  • @justinlim2256
    @justinlim2256 5 років тому

    Wow that's a good tutorial. Keep it up!!

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

    The bass of his voice !! i feel coming outta heaven

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

    You are great dude! Even though you uses old bloc version (presently 4.0), its useful for me to follow your tutorial, I have converted this project and few other into newer version (4.0.0) of flutter_bloc. There are lots of changes, but i am happy with the results. thanks a lot, i wish you could do some more fluttur_bloc Tutorials with newer version of bloc..

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

    Learnt new stuff! Thanks!

  • @luisv1308
    @luisv1308 5 років тому

    Excellent video! Thank you!

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

    Thanks a lot for tutorial very helpfull material about Bloc architecture

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

    Awesome tutorial!

  • @anangsuwasto7660
    @anangsuwasto7660 5 років тому

    thanks, great explanation

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

    block is great and i think this is the best video i found on how to use block. however, i prefer provider which in my opinion is more clear and need very less boilerplate code if not none. but hats off for the video

  • @heavylifter
    @heavylifter 5 років тому

    Very helpful!

  • @user-oq1hd8ds3q
    @user-oq1hd8ds3q 4 роки тому

    good tutorial, thanks!

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

    such a wonderful work this is, thank you very much. but did equatable have any rules in this tutorial?

  • @weidota
    @weidota 5 років тому +2

    Great video!
    I just have one question, when would you recommend using Equatable over built_value?

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

    Genious 😎

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

    Great Reso thank you! Great tutorial, just a quick question, how can we do a fade transition between the widgets returned in BlocBuilder? For a better ux, have a good Day!

  • @HerryTCO
    @HerryTCO 5 років тому +1

    Hi :) what is the best approach to perform a state change right when the app is opened? Like i want to fetch a List from an API right away.

  • @user-fh4xo2pc2d
    @user-fh4xo2pc2d 5 років тому

    Do we need built_value when we made use of equtable with Bloc library?

  • @marekchojecki4746
    @marekchojecki4746 5 років тому

    As it’s quite similar to redux, is that a good idea to move all BlocBuilder logic outside (to some reducer file) witch switch statements rather than if else block?

  • @pradeep422
    @pradeep422 5 років тому +2

    cool, can u provide widget testing usecase with blocprovider???

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

    Great tutorial! So what do you use for DI in flutter?

  • @Mani-xx4fz
    @Mani-xx4fz 3 роки тому +1

    I’ve been using this library in a couple of projects and it may be kind of difficult at first (due to the lack super enums like swift 😁 to define state and events) but when u start using it on medium - large sized projects it feels very natural and well abstracted..

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

      Nope, overhead. Boilerplate code.

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

      I spent more time maintaining bloc structure, files, logic than coding actual app, solving solution. Never again.

    • @Mani-xx4fz
      @Mani-xx4fz 3 роки тому

      @@KisrDeveloper Well, Bloc library is not a silver bullet to all, but on the meantime I personally find it more comfortable to work on mid-large sizes projects than other libraries.

  • @olusanyatodd4083
    @olusanyatodd4083 5 місяців тому

    Such a great video. A shame I had to search so far for a clear explanation of bloc!

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

    Great video. Anyway, I didn't understand why you used the BlocProvider when you already had the bloc into a variable?

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

    Such a great tutorial. But is there any better solution to check the states in UI without using "if" or "switch" statements? Or even in the logic section which we check the event, is there any better way to map all of these? Thanks.

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

    Hello, what about if u want to use this example on a login page? i have been using streams in a very simple form so i sent errors when (for example) u dont write a valid email. Help me pls, how can i send errors to my textfield?

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

    Please make a tutorial on Provider State Management

  • @saabsebadakhiladi3795
    @saabsebadakhiladi3795 5 років тому

    Hi pal, please can you do a tutorial on this Flutter package "scrolling_day_calendar", I am not sure how to implement it and I am new to flutter

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

    Thank you so much for the tutorial. It looks similar to provider package. Can you please upload a video for flutter_bloc with networking (api client, authentication etc). Do you have any complete flutter course in udemy?

  • @jerryzhoujw
    @jerryzhoujw 5 років тому

    BlocBuilder is kind of put all state of page together, for pulling a list there's 2 data (isPullingState, dataList), how can I avoid build widget part of dataList when dataList not change, but build widget part of isPullingState which changed from true to false ?

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

    Hello, in submitCityName how to the value carried by the current state ? Please help

  • @raja.babu3
    @raja.babu3 5 років тому +35

    Can you add a tutorial with firestore and flutter_bloc? It will be really useful.

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

      Just use create a database calass with all your logoc and use a streambuilder to react to doc changes

    • @raja.babu3
      @raja.babu3 3 роки тому

      @@alessandroruggiero8932 Awesome. Already solved it. That time was new to flutter bloc 😉.

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

      I did no see it was a year old 😂

  • @nowinowi9232
    @nowinowi9232 4 роки тому +12

    This pattern is probably the most insane anti patter I ever saw. Imagine, all we need to do is to update a value.

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

      Actually no.

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

      then take a look at Microsoft WPF. All the stuff that's been doing here is to try to only rebuild the UI when neccessary.

  • @LE8271
    @LE8271 5 років тому +52

    Is it only me who finds BLoC to be messy? I feel my code fragmented and difficult to overview. I mean come on: having 5-6 files plus repo and a half-dozen of classes for a single page is not really convenient. Just an opinion about BLoC itself not the video (which is great!).

    • @ResoCoder
      @ResoCoder 5 років тому +10

      That jumping between files is not the best thing, I agree. I guess you just have to choose between a mess in a single file or tidy code in many files.

    • @LE8271
      @LE8271 5 років тому +8

      @@ResoCoder yeah probably it falls back to the fact that Flutter itself is messy and way too verbose.

    • @darkcaster3619
      @darkcaster3619 5 років тому

      That's exactly what I thought lol

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

      Yeah, I feel the same, thats why I prefer Provider, so much easier and cleaner.

    • @foobax
      @foobax 4 роки тому +5

      Depends on how large and complex you app is. The more complex it is the more useful separation of concerns is. For a simple app, yes, this is a lot of files and you may want to tradeoff maintainability for putting this all in fewer larger files. That goes for the Flutter framework itself, it is "messy" because it is large and complex. Flutter/Dart is actually not very verbose compared to other languages such as Java or Objective-C.
      Provider may be more simple, and covers a lot of common use cases but BLoC provides streams of state, which is very powerful and if you need that, then this is actually a very simple way to achieve that functionality.

  • @m.arslankhan7449
    @m.arslankhan7449 4 роки тому

    wao great , Now I know my A B C......

  • @DiazGunturFebrian
    @DiazGunturFebrian 5 років тому

    How to use different type of subject? I guess the default is BehaviourSubject right? How to use PublishSubject or ReplaySubject?

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

    This pattern gives me nightmares, reminds me of how annoying it is to develop new features or refactoring on larger iOS apps. Thank god we have all these plugins in VSCode unlike Xcode 🤮. Flutter is still a breath of fresh air for native mobile devs. Thanks for breaking down everything about writing bloc code for flutter. Great video!!

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

    How do I keep the City Input Search Bar there instead of re-creating everytime the state is refreshed? Like in the demo, it is included in both states WeatherInitial and WeatherLoaded?

  • @kami2144
    @kami2144 5 років тому

    Could you do a tutorial with testing in Flutter?

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

    StatelessWidget or StatefulWidget i must use with BloC?

  • @ArvindKumar-ks2eu
    @ArvindKumar-ks2eu 3 роки тому

    hey did you installed any other extension for equatable bcz I am not able to navigate to that option after creating bloc with extension.

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

    When i type blockProvider it does not show (bloc) as instance rather it shows create create: (BuildContext context) => MyBloc()..KIndly resove

  • @miklosnemeth8566
    @miklosnemeth8566 5 років тому

    This is another fancy/great stream-based BloC variety, which is completely OK, since BloC was actually invented with streams in mind. On the other hand, the "Simple app state management published" on flutter.dev/docs/development/data-and-backend/state-mgmt/simple gives a lot simpler alternative, and it is not based on streams; instead, it uses the provider package maintained by the Flutter team. There are as many kinds of BloC implementations as many Dart/Flutter developers; the only thing being common is that all uses streams. Many of them are using additional libraries like rxdart. Some says that stream based state management is superior than provider's listener model. Since Google published Android Architecture with Live Data, View Model, Data Binding, programming Android/Java/Kotlin application state management is quite uniformized, this is absolutely not the case with Flutter/Dart.

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

    Why blocprovider doesn't accept bloc and there is no dispatch event?

  • @ItomanuId
    @ItomanuId 5 років тому

    what is the name of the extensions for Android Studio

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

    How did you get those cool IDE colors?

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

    I prefer having just one bloc class per "ui page" and bind all the states and events generated from the UI with the bloc without needing to be to generic. I mean, one page one bloc, Is this bad?

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

    Wait, in submitCityName from where you access the context since the function is declared outside of the build method.

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

      In Stateful Widgets you can access to the context from anywhere inside the class, sorry, I know this is an old question, but maybe my answer helps someone else.

  • @lunargixx6867
    @lunargixx6867 5 років тому

    Hey bro I am not able to update the dependencies. The console shows the error - Because bloc_library depends on flutter-bloc any which doesn't exist (could not find package flutter-bloc at pub.dartlang.org), version solving failed.

  • @jajasaria
    @jajasaria 5 років тому +1

    google already recommend "Provider". I think I'll stick with it. Btw thanks for the video.

    • @ResoCoder
      @ResoCoder 5 років тому +2

      Provider is a good alternative to Bloc, but if you were to use StreamProvider, I think you're better off sticking to Bloc.
      In the end, all that matters is your preference.

    • @raul286162
      @raul286162 5 років тому

      @@ResoCoder Currently Provider was integrated in Flutter_Bloc, I hope you make a new update video about this new refactored lib.

    • @miklosnemeth8566
      @miklosnemeth8566 5 років тому +1

      @@ResoCoder What do you mean, what's wrong with StreamProvider? My understanding is that StreamProvider is just one kind of providers in the provider package when your application really needs a data stream; while streams are the heart of BloC and used for every kinds of communication. With the provider package you can build complex applications without ever writing a single line of code using streams. In Bloc, you must be a master of streams (and rxdart as a matter of fact), otherwise you are lost and dead.

  • @helloitsme3252
    @helloitsme3252 5 років тому

    How does state management work in case of multiple pages?
    Do you have a different bloc for each page?

    • @ResoCoder
      @ResoCoder 5 років тому

      Usually yes. I have a few global Blocs for things like authentication.

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

    Thanks! I'm Interested in learning flutter, but state management looks still complex. I'm coming from android and having single mapEventToState looks scary, you will need a big swich case once it grows, won't you?

    • @777phoenix2
      @777phoenix2 4 роки тому

      It is like React Native redux, I looked 'what the fuck is this?' for the first time, after native 10 years developement..

  • @chordfunc3072
    @chordfunc3072 5 років тому +4

    Hi :D
    I have a question...
    I've written a couple of apps using the BloC pattern. The problem is (or it might not be a problem, let's find out...) is that I tend to prefer just making a stream on the bloc for each piece of state I want to send to the UI. Often with BehavoirSubjects from the Rx package if I'm calling some data repository where different part of the UI relays on the same piece of data, I'm sure you are familiar with BehaviorSubjects but in case you are not it basically dispatches the last data in the stream to any new subscribers.
    Exposing methods directly on the BloC is also something that I've favoring more and more. The nice thing about this is that you get a lot of the help from the IDE without having to look up the different event classes when it gets time to trigger a method.
    Could you maybe talk me out of these approaches😂 ? Perhaps there are some benefits that I'm not seeing?

    • @fmarko
      @fmarko 5 років тому

      That's what I do as well

    • @anonyknowns
      @anonyknowns 5 років тому

      Your approach seems less boilerplate-ty to me. I feel like there're too many files and steps just to manage the state of one screen using this package, maybe it's more suitable for a more complex app.

    • @chordfunc3072
      @chordfunc3072 5 років тому

      @@anonyknowns Im using the Provider package as well these days, its has a MultiProvider class which is pretty handy

  • @jktan5793
    @jktan5793 5 років тому

    Hi @Reso Coder
    May I ask if using "equatable" library for Bloc Library (UPDATED) , so we can skip the "built_value" library like the youtube search app in flutter ?
    Please correct me if i am wrong. and I feel using equatable is much more easy and simple than built value. just my opinion.
    Thank you =)

    • @ResoCoder
      @ResoCoder 5 років тому +1

      If all you want is to have data classes, then use equatable. Built Value is perfect for converting JSON strings and some heavy duty immutability.

    • @jktan5793
      @jktan5793 5 років тому

      @@ResoCoder thank you so much for the explanation.
      And if I want to use the "Moor" library, which one would your suggest me to use (either equatable / built value ) if I want to store the input data (when offline) in sqlite.
      And should I create separate for the data class dart file and the database table file too ?
      I am sorry if my questions are not clear enough.
      Thank you very much =)

  • @helloitsme3252
    @helloitsme3252 5 років тому +1

    In this code snippet:
    class WeatherPage extends StatefulWidget {
    WeatherPage({Key key}) : super(key: key);
    _WeatherPageState createState() => _WeatherPageState();
    }
    What is the purpose of this line of code:
    WeatherPage({Key key}) : super(key: key);
    Thanks!

    • @ResoCoder
      @ResoCoder 5 років тому +1

      For our use case, its purpose is basically nothing. Keys are used to get rid of UI-not-updating bugs.

    • @helloitsme3252
      @helloitsme3252 5 років тому

      @@ResoCoder Thank you :)

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

    I'd like to ask, Is Flutter more complex than React ??

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

    Thanks man, but I think Get-it is much better than Bloc for managing states (using simple and clean approach).

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

    use older version of bloc vs code extension otherwise it will generate different code files according to new block version

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

    Seems outdated, blocprovider doesn't accept bloc and there is no dispatch event, should I use mapeventtostate?

  • @jpkontreras
    @jpkontreras 5 років тому +1

    in 8:57 you were saying that code was "alread generated", that really happened or you typed it offscreen?

    • @ResoCoder
      @ResoCoder 5 років тому +1

      It was generated by the VS Code extension.

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

    Here's a link to the android studio extension: plugins.jetbrains.com/plugin/12129-bloc-code-generator

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

    Hello sir can you create new content about this, because it seems the new version of bloc is difference between this yours

  • @leukongsun4845
    @leukongsun4845 5 років тому

    And what is rxdart (pub.dev/packages/rxdart)?

  • @geraldcampana9296
    @geraldcampana9296 5 років тому

    what theme do you use?

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

    Are these streams really necessary? They complicate such a simple thing that is not really asynchronous.

  • @tudo-sobre-ai
    @tudo-sobre-ai 5 років тому +2

    The flutter_doc package was updated and now the code is broken.
    On the BlocProvider, change "bloc: weatherBloc," to:
    builder: (BuildContext context) => weatherBloc,
    dispose: (BuildContext context, WeatherBloc weatherBloc) => weatherBloc.dispose(),

    • @ResoCoder
      @ResoCoder 5 років тому

      Oh! He's so quick with these updates... But I mean, that's a good thing 😄

  • @hassanbaiga
    @hassanbaiga 5 років тому

    You added equatable to make var one = var one ?

    • @ResoCoder
      @ResoCoder 5 років тому

      Equatable makes two object with the same "content" be equal.

    • @mgorn
      @mgorn 5 років тому

      @@ResoCoder Is it any different from overloading the == operator?

    • @miklosnemeth8566
      @miklosnemeth8566 5 років тому

      @@mgorn No, but equatable does it for you :)

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

    you sound like gatis kandis from agt

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

    15:29 I don't understand how any of those if-statements are triggered.

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

      @@askolmayanveysel2221 I appreciate your explanation, and while I'm sure that answers my question, it doesn't make it any more clear to me.

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

    why do you keep outdated videos, this is 3rd time I got trapped in buggy mess of hours because of your videos.. Time is precious dude! At Least mention at start of video somewhere, "new updated video in cards.."

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

    Great video. Thanks for helping me decide not to go the BLoC route. Too verbose and cumbersome

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

    I don't get why bloc would be better than ChangeNotifier

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

    Why do you make something easy to be more complicated ?

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

    Bloc is so ugly, and confusing. Do you guys using this pattern instead of MVP or MVVM? Is it a trending ugly thing? It is like React Native and redux, also so ugly and confusing and a lot of files... First time I saw it I thought WTF.

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

    why do you keep outdated videos, this is 3rd time I got trapped in buggy mess of hours.. Time is precious dude! Atleast mention at start of video somewhere, "new updated video in cards.."

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

      I'd recommend to always check pub.dev for the newest package version and compare that with the version used in the tutorial.

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

    It's too complex

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

    imagine doing this for a complex project. Man this is just confusing and weird.

  • @akashkumardas6521
    @akashkumardas6521 5 років тому

    There is no Any dout that you and your tutorials are always awesome. But flutter code really look so messy...

    • @ResoCoder
      @ResoCoder 5 років тому +1

      Thank you! I don't know how long you're doing Flutter, but over time, this mess becomes an orderliness 😅

  • @nextbars
    @nextbars 5 років тому +1

    You should actually code and explain step by step, actually it looks like a PowerPoint presentation. Go more in deep and take your self at those moments when you didn't know any code so you can have a better perspective to teach. I hope you do good your intentions are very awesome just put more focus in the How to teach better instead of What new to teach...

    • @ResoCoder
      @ResoCoder 5 років тому +2

      Thank you for your remarks. This, however, isn't a tutorial for beginners.
      I agree, people who are just starting out will have a hard time trying to follow this quock style. On the other hand, I don't want to slow down the more advanced developers with countless repetition.

    • @miklosnemeth8566
      @miklosnemeth8566 5 років тому +1

      @@ResoCoder I am fully with you, your tutorials are excellent, you deservedly have that 26K subscribers including mine. I think you make a great balance between beginner and advanced lectures, this one is absolutely for advanced Flutter/Dart programmers.

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

    unsubscribed bro