Chopper (Retrofit for Flutter) - #1 Basics - Dart HTTP Client Generator Tutorial

  Рет қаралды 59,126

Reso Coder

Reso Coder

Күн бұрын

Пікірлер: 76
@sudesh6807
@sudesh6807 5 жыл бұрын
U know what we expect without asking. Thanks for another great tutorial👏
@Fybuh
@Fybuh 4 жыл бұрын
All i can say is This Guy Is Awesome!!! no pasting of codes gotten from God knows where. So Nice
@nbits7433
@nbits7433 4 жыл бұрын
One of the best tutorial on KZbin about Chopper. Thank you for your handwork for us and we all appreciate your kindness. Thank you.
@alexzehet
@alexzehet 4 жыл бұрын
Hi Matt, again awesome video series! Well Done! I would really appreciate a Part 4 about Authentication and Headers :)
@codinginflow
@codinginflow 5 жыл бұрын
Get to da choppa!
@ResoCoder
@ResoCoder 5 жыл бұрын
Ahhh! I was on the fence of saying it somewhere in the tutorial, but I opted not to 😢 I guess I'm not a meme master like you 😂
@mirankamal5431
@mirankamal5431 5 жыл бұрын
GET DOWN...
@allisongraig
@allisongraig 4 жыл бұрын
the file is not beign created
@nazar.kk1
@nazar.kk1 4 жыл бұрын
If you have problem this row: builder: (_) => PostApiService.create(), replace 'builder' with 'create': create: (_) => PostApiService.create(), It's all because of the 4th version of provider (Reso coder uses 3rd version in his video) You can check more Provider documentation here: pub.dev/packages/provider
@emanuelnlopez
@emanuelnlopez 4 жыл бұрын
trank you for this
@appCowboys
@appCowboys 5 жыл бұрын
Is Chopper in your opinion any better than Dio? I haven't used Dio but it has way more stars.
@bedellemotio9995
@bedellemotio9995 3 жыл бұрын
How to send multipart request wilt multiple values like image and strings etc ,please ?
@bedellemotio9995
@bedellemotio9995 3 жыл бұрын
why does not put any example on multipart requests?
@heshankumarasinghe3159
@heshankumarasinghe3159 2 жыл бұрын
Thanks. I enjoyed this!
@bartekpacia
@bartekpacia 5 жыл бұрын
Could you show how to use 2 or more ChopperServices within the same ChopperClient? I'd like to have a custom converter for each of the ChopperServices.
@ginanjarsetiawan7384
@ginanjarsetiawan7384 4 жыл бұрын
give error The argument type 'Widget Function(BuildContext)' can't be assigned to the parameter type 'Widget Function(BuildContext, Widget)'. on return Provider( builder: (_) => PostAPiService.create(), dispose: (context, PostAPiService service) => service.client.dispose(), );
@KenanYusubov
@KenanYusubov 4 жыл бұрын
Thanks a lot for tutorial. But I have a question. How to provide ApiService using flutter_bloc and bloc lib? is it possible? and how to dispose it?
@mohamdaoui1
@mohamdaoui1 4 жыл бұрын
I am also on the same boat, did you find any resources on how to do this?
@JohnDoe-fv5cu
@JohnDoe-fv5cu 3 жыл бұрын
Idk, as to me, too much boilerplate code for the generator. Just write a few lines more and you can easily go without any choppers. I think code generator must do all this work itself, e.g. as OpenAPI does. OpenAPI has its problems also but you literally need to pass it only a swagger URL and it will generate all the classes on its own
@uweopfern
@uweopfern 5 жыл бұрын
I have been following you in kotlin tuts, now i am happy that you also decided to use flutter as i do, we need another video of dealing with chopper while posting data, when is it coming out?
@ga28gx
@ga28gx 3 жыл бұрын
Thank you! I love this tutorial!
@voicheci007
@voicheci007 5 жыл бұрын
We don't know which way to go with Android Development these days. Java, Kotlin, Flutter. Also google hacking together stupid libraries like the Paging library (which is a complete mess) does not help at all. What is your recommendation?
@sergiofranklin8809
@sergiofranklin8809 4 жыл бұрын
Which one did you chose? And which one would you recommend me?
@colephelps7321
@colephelps7321 5 жыл бұрын
Thanks for this great tutorial. I tried chopper in one of my project and is working great. I'm a beginner in flutter development. Now I'm trying to implement bloc pattern for the same project, following your bloc tutorial on weather app ofcourse 😀. But one thing I can't figure out is, where to initialise chopper and where to dispose it. My app is a shopping cart. So far I have loaded list of products from my own API (without bloc). Now I want to use bloc for the same and later I have to show details of single product too. Another problem I faced was when device is not online, widget shows null pointer exception. I handed that case by showing no internet in a text widget. I also tried adding a retry button, but when I call bulid(context) in the onPressed, nothing happens. What method should I call to reload the page? I'm using stateless widgets only. I didn't find the need to use stateful widget so far in this app.
@Mahamad1231
@Mahamad1231 4 жыл бұрын
it clearly seems that you need to modify the UI based on a user interaction, which will be to use SF widget so that you call setState() method, which is to notify some values have changed and update the UI
@dimitristotsios2292
@dimitristotsios2292 5 жыл бұрын
Many of http api needs the use of headers providing a cookie one gets with an initial call, is in your plan to analyze the way one can obtain a cookie and use it during any calls? Thank you
@MoAdel92
@MoAdel92 4 жыл бұрын
so now i need to learn chopper after learning Dio and http??
@eliper1265
@eliper1265 3 жыл бұрын
Do you so think bloc is better then provider?
@ErSubhradeb
@ErSubhradeb 4 жыл бұрын
Hi, I don't know why I got this error, like chopper_generator:chopper_generator on lib/network/model/api_services.dart: Missing "part 'api_services.chopper.dart';", Please help me. when I use the command flutter packages pub run build_runner watch form Android Studio, I had change the analyzer part also but no luck.
@gwalter
@gwalter 3 жыл бұрын
The filenames must be the same apart from the .chopper.dart. So if you have api_services, your part needs to be api_services.chopper.dart
@ro7an636
@ro7an636 4 жыл бұрын
if " flutter packages pub run builder_runner watch" doesn't work, add: analyzer: in pubspec.ymal file in dependecies section below provider:
@nephylumsaracen6722
@nephylumsaracen6722 4 жыл бұрын
Thanks, this did the trick. Most useful comment on here.
@naifandroid3694
@naifandroid3694 4 жыл бұрын
Really, I would like to thank you for you video and sharing those info with us but I wish if you could show us how to integrate Woo-commerce REST API With Flutter App and make Wordpress as backend system for my App?
@oussamaelbaz7675
@oussamaelbaz7675 4 жыл бұрын
You are doing a greate job men!
@martinrupertbulquerin228
@martinrupertbulquerin228 5 жыл бұрын
Awesome tutorial! What theme are you using?
@khoadiepdang7075
@khoadiepdang7075 4 жыл бұрын
Hi, how to solve CERTIFICATE_VERIFY_FAILED error while performing a POST request?
@russellogieva4245
@russellogieva4245 5 жыл бұрын
Thanks for awesome tutorial. Please, can you help with a role-based authentication login tutorial that displays different drawer navigation bar for different users (e.g Student, Teacher, Parent)?
@rishabhv1509
@rishabhv1509 5 жыл бұрын
how to add interceptors to log the send and get requests
@easazade
@easazade 4 жыл бұрын
can you please do a tutorial on dio package
@blkblk3226
@blkblk3226 4 жыл бұрын
How to implement this with Clean Architecture + TDD
@Amankumar_Raone
@Amankumar_Raone 5 ай бұрын
nyc explaination
@juljer1740
@juljer1740 3 жыл бұрын
Nice tutorial!
@alifyz
@alifyz 5 жыл бұрын
Great tutorial man!
@tesla1772
@tesla1772 4 жыл бұрын
is there any way so that i can cancel by http request
@mortezaro1249
@mortezaro1249 4 жыл бұрын
what`s name this color theme vs code???
@allisongraig
@allisongraig 4 жыл бұрын
the file is not beign created
@shivramshrestha3877
@shivramshrestha3877 5 жыл бұрын
can u provide documentation for chopper i searched it but couldn't find it
@ResoCoder
@ResoCoder 5 жыл бұрын
The sad thing is, there is currently no documentation outside of this tutorial. I honestly don't know why the author of this package doesn't make any docs.
@shivramshrestha3877
@shivramshrestha3877 5 жыл бұрын
@@ResoCoder oh!!!!! thank u for your fast reply and waiting for next tutorial ...
@joelcorbalan3810
@joelcorbalan3810 5 жыл бұрын
love this channel
@frankbanini8884
@frankbanini8884 5 жыл бұрын
Class Act Masterpiece
@eenvoo
@eenvoo 5 жыл бұрын
i am receiving "Invalid argument(s): Path must be absolute " error :( whenever i run "flutter packages pub run build_runner build" command
@ResoCoder
@ResoCoder 5 жыл бұрын
I got that error too as I was recording a new tutorial today and I almost plucked my hair out! What you need to do is to go to the pubspec.*lock* file (not yaml) and change the analyzer version to "0.38.2". I don't know why they push out broken code, but hey, that's how it is. I hope this solves the issue for you.
@eenvoo
@eenvoo 5 жыл бұрын
@@ResoCoder Yeah it solved my problem! Thank you bro. If we weren't far away, I'd buy a coffee for you :D
@mkroven
@mkroven 4 жыл бұрын
Thx. But how did post method know value should be 101. Where is it keeping the length of posts?
@elizabethfransen398
@elizabethfransen398 5 жыл бұрын
Why did you decide to make create a static method and not a factory constructor?
@ResoCoder
@ResoCoder 5 жыл бұрын
Factory constructors and generated classes don't go well together. It's easier with a static method, you'll get errors otherwise.
@elizabethfransen398
@elizabethfransen398 5 жыл бұрын
@@ResoCoder would you be willing to post a resource or go more in depth on why it causes errors. Iirc, in your built value tutorial we used a factory constructor but not in this one.
@ResoCoder
@ResoCoder 5 жыл бұрын
I'm not sure to be honest. If you try it yourself, Dart will simply indicate a compile time error.
@nitillo
@nitillo 4 жыл бұрын
good job
@leetkhan
@leetkhan 4 жыл бұрын
Perfect man
@aka.Xavier
@aka.Xavier 3 жыл бұрын
first, thank you very much for the video, I liked this video because I really appreciate your time and effort. but for me, this is not practical at all. we expect to save time and simplify our code, not to write sooooo much complex boilerplate code
@纪亚荣
@纪亚荣 5 жыл бұрын
Hi, Reso Coder I often watch your videos on KZbin and I am a coder from china I am a beginner of flutter and recently, I had a problem about flutter, there is a discuss on github github.com/flutter/flutter/issues/11655, I am so confuse about this problem, and I download one of your tutorial project, I found the same problem, the tutorial project is flutter-chopper-tutorial-course, the problem is in the PostList when I navigator to PostDetail, the PostList will fetch data again, that mains build has been trigger, and I back to PostList, it fetch again! I think this is a big problem, please help me
@ResoCoder
@ResoCoder 5 жыл бұрын
Responded through email 📧
@emmanuelonwumah915
@emmanuelonwumah915 5 жыл бұрын
When are we getting more Kotlin tutorials?
@ResoCoder
@ResoCoder 5 жыл бұрын
Once Jetpack Compose is considered stable-ish.
@leoboissard6306
@leoboissard6306 5 жыл бұрын
im happy with flutter ;)
@faisalahmed1981
@faisalahmed1981 5 жыл бұрын
Boss
@husseinkamal22
@husseinkamal22 4 жыл бұрын
How to send multipart request wilt multiple values like image and strings etc ,please ?
@bedellemotio9995
@bedellemotio9995 3 жыл бұрын
did you find the solution?
How to call a Java REST API using JDK Http Client
22:23
Dan Vega
Рет қаралды 9 М.
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
Synyptas 4 | Арамызда бір сатқын бар ! | 4 Bolim
17:24
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 16 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 88 МЛН
API Retrofit + dio | Flutter приложение с нуля №9
25:33
Стас Ильин
Рет қаралды 4,3 М.
How To Call a REST API In Java - Simple Tutorial
29:14
Coding with John
Рет қаралды 277 М.
REST Call with Flutter - Http methods
19:55
CodeX
Рет қаралды 72 М.
Implementing complex UI with Flutter - Marcin Szałek | Flutter Europe
44:26
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34