-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting below error on upgrading jaguar_retrofit to 2.8.1 #42
Comments
@noisytempo Please change the code to: import "dart:async";
import 'package:jaguar_resty/jaguar_resty.dart' as resty;
import 'package:jaguar_retrofit/jaguar_retrofit.dart';
import 'package:jaguar_serializer/jaguar_serializer.dart';
import 'package:rozana_api_service/data/model/dto/credentials.dart';
import 'package:rozana_api_service/data/model/dto/customer.dart';
part 'auth_api_service.jretro.dart';
@GenApiClient(path: "api")
class AuthApiService extends ApiClient with _$AuthApiServiceClient {
final resty.Route base;
AuthApiService({this.base, CodecRepo jsonConverter}) {
this.jsonConverter = jsonConverter;
}
@PostReq(path: "register")
Future registerCustomer(@asjson() Customer Customer);
@PostReq(path: "authenticate")
Future authenticateUser(@asjson() Credentials credentials);
} |
@tejainece The code you have mentioned above still does not solve the issue. I am still getting the issue mentioned above on the fresh run but on hot reload, the issue seems to go away and |
After |
Awesome! |
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Exception: Converter for content type 'application/pdf' not found! |
Doctor summary (to see all details, run flutter doctor -v): [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • No issues found! |
E/flutter (12053): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter (12053): Exception: Converter for content type 'application/json' not found!
E/flutter (12053): #0 ApiClient.decodeOne (package:jaguar_retrofit/client/client.dart:23:7)
E/flutter (12053):
E/flutter (12053): #1 _RootZone.runUnary (dart:async/zone.dart:1379:54)
E/flutter (12053): #2 _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
E/flutter (12053): #3 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
E/flutter (12053): #4 Future._propagateToListeners (dart:async/future_impl.dart:671:32)
E/flutter (12053): #5 Future._complete (dart:async/future_impl.dart:476:7)
E/flutter (12053): #6 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
E/flutter (12053): #7 _AsyncAwaitCompleter.complete. (dart:async/runtime/libasync_patch.dart:33:20)
E/flutter (12053): #8 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter (12053): #9 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
Current implementation of the api-service file is as below:
import "dart:async";
import 'package:jaguar_resty/jaguar_resty.dart' as resty;
import 'package:jaguar_retrofit/jaguar_retrofit.dart';
import 'package:jaguar_serializer/jaguar_serializer.dart';
import 'package:rozana_api_service/data/model/dto/credentials.dart';
import 'package:rozana_api_service/data/model/dto/customer.dart';
part 'auth_api_service.jretro.dart';
@GenApiClient(path: "api")
class AuthApiService extends ApiClient with _$AuthApiServiceClient {
final resty.Route base;
final JsonRepo jsonConverter;
AuthApiService({this.base, this.jsonConverter});
@PostReq(path: "register")
Future registerCustomer(@asjson() Customer Customer);
@PostReq(path: "authenticate")
Future authenticateUser(@asjson() Credentials credentials);
}
The text was updated successfully, but these errors were encountered: