Questions tagged [chopper]

42 questions
1
vote
0 answers

Flutter Chopper Post image

I try send image using flutter chopper. I try do it at 2 different ways, but none work. @Post(path: '/photos') @multipart Future postFile( @Header('token') String token, @PartFile('file') List bytes); @Post(path:…
sosnus
  • 968
  • 10
  • 28
1
vote
2 answers

Why am I getting an error when trying to call a method with flutter chopper and built value?

I'm getting The below ERROR,I believe it's because of null safety, this means that no data has been received or getSignedInUser() method is incorrect or class BuiltValueConverter is the cause. (I tested the token with Postman and retrieved the…
UN..D
  • 543
  • 5
  • 15
1
vote
0 answers

flutter chopper build fail after upgrade from 3.0.1 => 4.0.1, please help to understand generator output

I did upgrade my flutter project to flutter2, as a part of the upgrade I did upgrade chopper version from 3.0.1 to 4.0.1 nullsafety. After that the command flutter packages pub run build_runner watch --delete-conflicting-outputs start to show errors…
1
vote
1 answer

Adding more than one converter in ChopperClient flutter

I am creating different .g.dart classes using json-annotation for different set of responses. Now when I am using Chopper Client for making requests and mapping responses into model classes, I am creating converter. But I can only assign one…
vivek_ios
  • 173
  • 3
  • 13
1
vote
1 answer

Converting JSON response to Model Object using Chopper library in flutter?

I am using the Chopper library to invoke rest API calls. I have followed Raywenderlich Chopper Tutorial tutorial to implement API calls in my project. In this tutorial, they have used the below code to convert JSON response to Popular model object. …
Cherry
  • 699
  • 1
  • 7
  • 20
1
vote
1 answer

Using Chopper networking library with flutter_bloc library in flutter

I am using the Chopper library to invoke Rest APIs and flutter_bloc for my business logic. My Chopper class import 'package:chopper/chopper.dart'; import '../model/statement_res.dart'; import 'model_converter.dart'; part…
Cherry
  • 699
  • 1
  • 7
  • 20
1
vote
1 answer

Flutter Chopper does not handle error response

I am using chopper in my flutter project like this. AuthRestService class: import 'package:chopper/chopper.dart'; import 'package:flutter_meal_app/utils/constants.dart'; import 'package:injectable/injectable.dart'; part…
Palak Darji
  • 1,084
  • 18
  • 28
1
vote
2 answers

When parsing the constructor GQLReq of type Hasura.GraphQL.Transport.HTTP.Protocol.GQLReq expected Object but got String

I am trying to make a request to a Hasura backend using Flutter, Chopper and Built Value and I am getting the following error > When parsing the constructor GQLReq of type Hasura.GraphQL.Transport.HTTP.Protocol.GQLReq expected Object but got…
Chris
  • 1,641
  • 1
  • 16
  • 17
1
vote
1 answer

Error parsing nested JSON using Built-value

I am trying to use the built-value package to serialize/deserialize data. But I am facing difficulty parsing nested JSON data using the above package. Please help where do I have to make changes, as most of the code is automatically generated by…
Kalit Inani
  • 59
  • 1
  • 10
1
vote
1 answer

Chopper using MVP Architecture in flutter

Im using Chopper for calling api and i want to get result json, this is the API i want to call [https://api.jsonbin.io/b/5e1219328d761771cc8b9394] I would like to ask how to resolve this kind of problem, Unhandled Exception: NoSuchMethodError: The…
Jude Bautista
  • 160
  • 1
  • 16
0
votes
1 answer

Flutter chopper swagger_dart_code_generator API repeating request endlessly without response

I am trying to set up a client to my nestJs server. I generate a swagger documentation with nestJS/swagger and from there I use the swagger_dart_code_generator to generate the API code for my client. The Server works fine, I tested this with…
Haissem55
  • 93
  • 5
0
votes
1 answer

chopper - Specify custom path for generated files

The chopper library is similar to the Retrofit library in native Android development. It utilizes the build_runner package to generate code through the flutter pub run build_runner build command. By default, the generated files are placed in the…
0
votes
0 answers

Dart/Chopper/Flutter - _TypeError (type '_Map' is not a subtype of type 'Auth?')

When running a POST request, I get a 200 response from the server, however the interceptor throws an exception as per the title. Any help with what I'm doing wrong would be much appreciated. This only happens on successful requests, failed requests…
Brandon Stillitano
  • 1,304
  • 8
  • 27
0
votes
0 answers

How to do certificate pinning with chopper client

I'm developing an application using ChopperClient. To improve application security I want to do certificate pinning by using http_certificate_pinning library. What I've tried: I try using HttpCertificatePinning.check as suggested in the library's…
NGC4889
  • 45
  • 8
0
votes
1 answer

Flutter Chopper Internet connectivity

How in flutter project check internet connectivity and throw a page with text like "No internet" using Chopper only? without data_connection_checker or else