Skip to content
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

Error: Type 'ParseErrorLogger' not found #722

Open
chriskikoti opened this issue Nov 10, 2024 · 6 comments
Open

Error: Type 'ParseErrorLogger' not found #722

chriskikoti opened this issue Nov 10, 2024 · 6 comments

Comments

@chriskikoti
Copy link

chriskikoti commented Nov 10, 2024

ParseErrorLogger not found
Retrofit REST client generates .g.dart and adds errorLogger to constructor of the generated file (i.e. .g.dart) of type ParseErrorLogger errorLogger but that class ParseErrorLogger is not found

To Reproduce
Here is a code that I use to generate REST client:

`part 'auth_client.g.dart';

@RESTapi()
abstract class AuthClient {
factory AuthClient(Dio dio, {String baseUrl}) = _AuthClient;

@post('auth/register')
Future signup(@Body() body);

@post('auth/login')
Future getUser(@Body() body);
}`

dependencies:
retrofit: ^4.4.1
logger: ^2.4.0
json_annotation: ^4.9.0

dev_dependencies:
build_runner: ^2.4.13
json_serializable: ^6.8.0
retrofit_generator: ^9.1.4

Expected behavior
To have a working generated class with extension .g.dart

My environment
Java version: 17
Flutter SDK version: 3.24.4
OS: Ubuntu 24.04

@sirjager
Copy link

Facing the same issue, with latest retrofit package

@joknjokn
Copy link

joknjokn commented Nov 12, 2024

Worked for me: #715 (comment)

@shamsuddin-cse
Copy link

import 'package:retrofit/retrofit.dart' instead of import 'package:retrofit/http.dart';

@Supertommino
Copy link

import 'package:retrofit/retrofit.dart' instead of import 'package:retrofit/http.dart';

Thank you very much, it works :)

@Shindd9908
Copy link

import 'package:retrofit/retrofit.dart' instead of import 'package:retrofit/http.dart';

Thanks bro, it works.

@AmineAmAndroid
Copy link

thanks bro it works with me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants