We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To Reproduce
import 'package:json_annotation/json_annotation.dart'; part 'api_response.g.dart'; @JsonSerializable(genericArgumentFactories: true) class SomeModelWithGenericType<T> { final T data; SomeModelWithGenericType( {required this.data, }); factory SomeModelWithGenericType.fromJson(Map<String, dynamic> json, T Function(Object? json) fromJsonT) => _$SomeModelWithGenericTypeFromJson(json, fromJsonT); Map<String, dynamic> toJson(Object? Function(T) toJsonT) => _$SomeModelWithGenericTypeToJson(this, toJsonT); } class SomeModel { final String name; } @GET('/some/api') Future<List<SomeModelWithGenericType<SomeModel>>> getSomething();
Expected behavior To generate code without errors
Screenshots
Flutter 3.22.0 • channel stable
dependencies: json_annotation: ^4.9.0 dev_dependencies: json_serializable: ^6.8.0 retrofit_generator: ^8.1.0 build_runner: '>=2.4.10 <4.0.0'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
To Reproduce
Expected behavior
To generate code without errors
Screenshots
Flutter 3.22.0 • channel stable
The text was updated successfully, but these errors were encountered: