In the latest flutter_bloc updates you would find an error while creating WeatherBloc class since there have been a few changes. One, the initialState getter doesn't exist anymore. Two, the superclass Bloc MUST have a non-zero argument constructor. The argument passed is itself the initial state of the bloc. Code Fix - Remove the initialState getter. Add this line inside the bloc -- WeatherBloc() : super(WeatherIsNotSearched()); WeatherIsNotSearched being the initialState which earlier was declared using the initialState getter. Excellent tutorial, though. Well-planned and well-executed.
@fahadtahir63 жыл бұрын
I have filtered out so many many tutorials for api calling with Bloc and I got to say this is amongest the best tutorial ever for learning Bloc as well as Api calling. Thank you Maaz. Huge effort.
@geoffrey98883 жыл бұрын
I believe this is the best tutorial on bloc. Other tutorials dont explain it in a usable way they only explain the default increment and decrement. But in this video we can see a practical way of doing this. You've earned a new subscriber.
@ismaila27904 жыл бұрын
I watched 3videos with simple app examples but advanced way of laying out bloc which is not for someone trying to understand Bloc from scratch. Your video on the other hand was soo simple, and it was very helpful to just layout all the classes in one file to actually have the full picture. I think what you should do after this video is to restructure the classes in state, event and bloc folders. Thank you so mush ♥ 🙏
@EasyApproach4 жыл бұрын
I am pleased :) please subscribe the channel.
@ismaila27904 жыл бұрын
@@EasyApproach Already a subscriber :)
@KamalVerma-wv1bg2 жыл бұрын
Finally after watching alot of other video this video helped me to understand the whole concept
@alizajamal27984 жыл бұрын
I'm amazed by the fact that you know so much, I keep wondering about the efforts it took for you to reach there. :) Hope to get more videos on state management approaches and their comparison. keep it up 🖐🏻
@EasyApproach4 жыл бұрын
Thanks. Please watch all the other videos.
@jackryan14854 жыл бұрын
Hi bro I just watched your video and believe me i completely understand it and will surely implement it in my next production app, till now i didn't had an idea about how BLOC works but now i got it perfectly and will surely use it in next project. BTW i was using Providers till now in app, which is quite complex and it increases complexity in UI files. Thank your again.
@EasyApproach4 жыл бұрын
Bro thanks :)
@marcothe_pineapple89054 жыл бұрын
Thanks man so much easy to understand....bloc was different for me to understand since coming from iOS developer background..but u made it easy..also understood some other concepts of flutter since u explained everything in detail..thanks a lot.
@EasyApproach4 жыл бұрын
Thanks. Please subscribe the channel for more :)
@mohammedhamdan11124 жыл бұрын
one of the most important tutorial . thanks a lot for showing a real life example !!
@EasyApproach4 жыл бұрын
Glad it was helpful!
@badaruoluwasegun5864 жыл бұрын
Wow...It's such an eye opener for me as to how BLOC Pattern works. And with this your simplicity in explanation, I feel much comfortable with BLOC Pattern. Thanks for this, really appreciate. Already a subscriber.
@EasyApproach4 жыл бұрын
Glad it was helpful!
@EasyApproach4 жыл бұрын
Thank you. Please subscribe the channel.
@Anullos423 жыл бұрын
Very well, i dont understand a lot english but u write very simple. thank u!
@EasyApproach3 жыл бұрын
You are welcome! Please subscribe the channel.
@Anullos423 жыл бұрын
@@EasyApproach done
@grevity19434 жыл бұрын
loved your explanation, honestly saying this is the best video on bloc i've ever found!
@gurkaransingh4494 жыл бұрын
and this is my other account im subscribing from
@TreyHope4 жыл бұрын
Thank you very much for this explanation, very helpful.
@EasyApproach4 жыл бұрын
Thank you so much please subscribe the channel
@irhas65554 жыл бұрын
I working using flutter so I need to subscribe this channel
@EasyApproach4 жыл бұрын
Thanks
@giaptt40374 жыл бұрын
thank you for this tutorial, It's very useful for newbie with bloc like me 😂
@amimulihsan53543 жыл бұрын
Well explained. Thank you. It was really understandable.
@EasyApproach3 жыл бұрын
Thank you. Please subscribe the channel.
@oguzkuzu61794 жыл бұрын
Loved it. Thank you! Please make more flutter tutorials in English
@EasyApproach4 жыл бұрын
Thanks :) Please subscribe the channel for more videos
@typesoffun4 жыл бұрын
you are awesome bro..very good knowledge please upload more
@EasyApproach4 жыл бұрын
Thank you, I will
@yasharma23014 жыл бұрын
You made Bloc pattern so easy, Subscribed!
@EasyApproach4 жыл бұрын
Glad it helped :D
@vitalityofmind58643 жыл бұрын
thank you sir, very helpful.
@EasyApproach3 жыл бұрын
Thank you. Please subscribe the channel.
@kozimjonkholmirzaev47013 жыл бұрын
amazing usefull
@EasyApproach3 жыл бұрын
Thank you. Please subscribe the channel.
@asadhameed10394 жыл бұрын
Pure next level 🙌
@EasyApproach4 жыл бұрын
Thank you. Please subscribe the channel.
@karthikm70634 жыл бұрын
what is the use of equatable ?. why use pass _city and weather in equatable. can you please explain ?
@karthikm70634 жыл бұрын
Thanks * 10000000 man , its 2 am i have been looking at different bloc tutorials. This is the one i understand most. i will try to connect api using bloc from office. Some doubts are there but still i think i can make it work. My last app(first app) was a mess it was full of set state + streambuilder , api calling inside ui programmed in the most stupid way possible (client will kill me if he see the code). i think my next app will be little bit better. Again thanks a lot man. Hope you reach 10k sub fast and get some money out of this. if there is any change in bloc for newer version please let me know !.
@EasyApproach4 жыл бұрын
Thanks. Please subscribe the channel.
@IshaqueHassan4 жыл бұрын
Really great one
@EasyApproach4 жыл бұрын
Thanks 🔥
@samarfarag23754 жыл бұрын
Great tutorial , thanks
@EasyApproach4 жыл бұрын
Thanks for the appreciation :) Please subscribe the channel for more videos!
@sethysoumyaranjan4 жыл бұрын
Very Nice and Clean Video!
@EasyApproach4 жыл бұрын
Thank you :) Kindly subscribe the channel
@mrnicolaoda4 жыл бұрын
Thanks for the tutorial! it is awesome and easy to understand. I will try to use your pattern to my next project of Flutter. But there is a question about it, how to implement more blocs in main.dart? Is there any of your videos explaining how to implement more than one bloc? Let me know. Thanks, mate!
@EasyApproach4 жыл бұрын
Don't have yet!
@danku134 жыл бұрын
hi! great video, can you comment what will be different with flutter_bloc ^6.0.2 instead of flutter_bloc ^2.0.0
@miftahuljihad46384 жыл бұрын
Awesome Tutorial! I love it...
@EasyApproach4 жыл бұрын
Thank you :)
@baselnat934 жыл бұрын
Hi thanks alot for this great video i have two questions : 1- the usage of Equatable i understood the need of not "rebuild" the widget when the same state goes in but when you extend this Equatable and implement that props method how its working since you are not triggering anything here !! 2- what is the difference between BlocListeners and BlocBuilders what logic should be in each one of these? thanks alot in advance
@EasyApproach4 жыл бұрын
The use of equatable is different check this for more detail : pub.dev/packages/equatable. BlocBuilder builds the UI on new state, however in BlocListener you listen to the new states to perform some operations like showing snackbar or navigating to the next screen... .
@baselnat934 жыл бұрын
@@EasyApproach thanks alot for the quick response actually i checked the docs of equatable and i didnt find anything related to Bloc also in your video you mentioned that same thing i said and actually it make sense but i just couldnt understand how does it work kindly check at 15:33
@nerocastello85874 жыл бұрын
Hi thankyou for this wonderful tutorial, my only concern is where do I put bloc.close() to close out the bloc?
@emmanuelezejiobi8908 Жыл бұрын
please anyone knows why i keep getting this error = Bad state: add(FetchWeather) was called without a registered event handler. Make sure to register a handler via on((event, emit) {...})
@fatihfajral4 жыл бұрын
Good
@EasyApproach4 жыл бұрын
Thanks
@enzuwu4 жыл бұрын
Great tutorial! I have a question though, in your video, you did not dispose of the bloc. I've read somewhere that it causes memory leaks if you don't dispose of it after a use case. So is that okay?
@EasyApproach4 жыл бұрын
Yes it is important to dispose the bloc, may be I forgot!
@marcothe_pineapple89054 жыл бұрын
I read it somewhere blocprovider does disposing of bloc on its own..dont need to do it manually.
@jose99Av4 жыл бұрын
great video, it was very helpful, I'am having a little of trouble when I'am doing the bloc with the constructor on WeatherBloc extends Bloc... while doing the constructor it said: "The superclass 'Bloc' doesn't have a zero argument constructor." please if someone now something I will be very greatful. already solved, it was cause the new version of bloc.
@oriogaming81424 жыл бұрын
If we will again press the search button after loading the weather once then it should return home page - for this we need to do something like associate it with weathernotsearched state ? And by the way you didn't took use of initial state why ?
@krishnakumarramachandran58884 жыл бұрын
Thanks for this video brother, i have one doubt what is the use of Equatable ?
@EasyApproach4 жыл бұрын
It helps in comparing the class instances. See pubdev and read documentation you will get the answer
@Golnarsheikhbahaie4 жыл бұрын
thnx for video ;) .... guys is there any video for http post request in bloc pattern ?????
@awlad2 жыл бұрын
Good tutorial on bloc, I have a question say you want to update your block state (refresh api call) based on a firestore stream value how would you do it? Thanks
@EasyApproach2 жыл бұрын
Listen to the stream and on new data just add a new state updateState.
@awlad2 жыл бұрын
@@EasyApproach Thanks are you able to provide code sample? Thanks
@subaruhassufferredenough78924 жыл бұрын
Thanks for this amazing tutorial. Just one thing, what if I am using navigation routes to implement the search result as a separate page? How can I use BloC pattern in that case?
@EasyApproach4 жыл бұрын
If I am not wrong you are asking about how to navigate to other screen when we have some new particular state. If yes, then in BLoC, there is a something called BlocListener and inside it you can navigate to other screen on getting new state
@subaruhassufferredenough78924 жыл бұрын
@@EasyApproach Thanks so much. That is exactly what I was asking about.
@EasyApproach4 жыл бұрын
I am glad. Please subscribe the channel! :)
@subaruhassufferredenough78924 жыл бұрын
@@EasyApproach done.. Keep up with the excellent content.
@EasyApproach4 жыл бұрын
@@subaruhassufferredenough7892 Thank you so much! I appreciate.
@krishkapadia57042 жыл бұрын
can we done all the things without creating model class? like react js or react-native
@shivamagrawal69912 жыл бұрын
I can't understand how to use if one screen in multiple event
@umidjonshoniyozov1624 жыл бұрын
Thanks bro
@EasyApproach4 жыл бұрын
Please subscribe the channel for more such videos!
@azeemushanali984 жыл бұрын
Brother I have One query please solve it,if possible.I am trying to print some of my http response.body in a Text widget.I have strored that response.body part in a variable and when I pass that variable it throws an error and app crashes down.It says - " Flutter is not a subtype of String".Please help me.!!
@heyoung5484 жыл бұрын
Could you add streambuilder into this BLoc pattern?
@EasyApproach4 жыл бұрын
Sure in Future video!
@rizwanulhaquerizvi2653 жыл бұрын
Can anyone help me? What does get props do?
@saeed5774 жыл бұрын
not bad
@EasyApproach4 жыл бұрын
Thanks
@i-am-learning-life4 жыл бұрын
please use vs code i love that editor it is clear to see there
@EasyApproach4 жыл бұрын
Ok sure! I would definitely do! Thanks for the suggestion. Please subscribe the channel to get more videos! :)
@vkumarnegi4 жыл бұрын
@@EasyApproach Use the IDE you're comfortable with. Don't let the tools affect your teaching style just because someone is not comfortable. They'll get along if you teach well.
@EasyApproach4 жыл бұрын
@@vkumarnegi :)
@AwesomeShamik4 жыл бұрын
Wouldnt it makes sense, in the long run, to use Android Studio as an IDE for Flutter since both are from the same company Google
@kxaif4 жыл бұрын
Can i know how to learn flutter to advance,how did you learnt flutter
@EasyApproach4 жыл бұрын
Just try different things in Flutter, and if you find any issue try to find the solution and the reason why did you get this error, by doing this, gradually, you will be pro ;)
@leniloud20723 жыл бұрын
What if I want to get the pressure and humidity how can I do that
@EasyApproach3 жыл бұрын
It is already we are getting from api
@russazsuraj6303 жыл бұрын
I don't know what is the reason but mine shows Error in the initial state :(
@tumhokon55983 жыл бұрын
Hii suraj i am also working on wheather app, can we chat on telegram ?
@kawtarkawtar98484 жыл бұрын
will the API of this site be free even if I put the application on play stor? or i will pay
@EasyApproach4 жыл бұрын
It's free.
@kawtarkawtar98484 жыл бұрын
@@EasyApproach thank u so much
@faheemahmad3957 Жыл бұрын
pleas remake for flutter 3.13
@terlumunjoseph67794 жыл бұрын
your view is too small increase zoom level
@EasyApproach4 жыл бұрын
Sorry for the this. In latest videos screen is zoomed