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

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

КОМЕНТАРІ • 76

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

    U know what we expect without asking. Thanks for another great tutorial👏

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

    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 UA-cam about Chopper. Thank you for your handwork for us and we all appreciate your kindness. Thank you.

  • @codinginflow
    @codinginflow 5 років тому +27

    Get to da choppa!

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

      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 років тому +3

      GET DOWN...

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

      the file is not beign created

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

    Hi Matt, again awesome video series! Well Done! I would really appreciate a Part 4 about Authentication and Headers :)

  • @nazar.kk1
    @nazar.kk1 4 роки тому +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

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

    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.

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

    Thanks. I enjoyed this!

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

    Is Chopper in your opinion any better than Dio? I haven't used Dio but it has way more stars.

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

    Thank you! I love this tutorial!

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

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

    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?

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

    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

  • @JohnDoe-fv5cu
    @JohnDoe-fv5cu 4 роки тому +1

    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

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

    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?

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

    How to send multipart request wilt multiple values like image and strings etc ,please ?

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

    You are doing a greate job men!

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

    why does not put any example on multipart requests?

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

    if " flutter packages pub run builder_runner watch" doesn't work,
    add:
    analyzer:
    in pubspec.ymal file in dependecies section below provider:

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

    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?

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

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

    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 років тому +1

    how to add interceptors to log the send and get requests

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

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

    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 4 роки тому

      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

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

    Great tutorial man!

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

    so now i need to learn chopper after learning Dio and http??

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

    Do you so think bloc is better then provider?

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

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

    can u provide documentation for chopper i searched it but couldn't find it

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

      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 років тому +1

      @@ResoCoder oh!!!!! thank u for your fast reply and waiting for next tutorial ...

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

    can you please do a tutorial on dio package

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

    Nice tutorial!

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

    How to implement this with Clean Architecture + TDD

  • @Amankumar_Raone
    @Amankumar_Raone 8 місяців тому

    nyc explaination

  • @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 років тому +1

      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?

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

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

    love this channel

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

    Why did you decide to make create a static method and not a factory constructor?

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

      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 років тому +1

      I'm not sure to be honest. If you try it yourself, Dart will simply indicate a compile time error.

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

    Class Act Masterpiece

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

    the file is not beign created

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

    good job

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

    When are we getting more Kotlin tutorials?

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

      Once Jetpack Compose is considered stable-ish.

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

      im happy with flutter ;)

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

    Perfect man

  • @纪亚荣
    @纪亚荣 5 років тому

    Hi, Reso Coder
    I often watch your videos on UA-cam 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 📧

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

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

    Boss

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

    How to send multipart request wilt multiple values like image and strings etc ,please ?