import 'package:json_annotation/json_annotation.dart'; part 'car_dto.g.dart'; @JsonSerializable(createToJson: false) class CarDto { final List? result; const CarDto({this.result}); factory CarDto.fromJson(Map json) => _$CarDtoFromJson(json); } @JsonSerializable(createToJson: false) class CarResultDto { final String? id; final CarAttributesResultDto? attributes; const CarResultDto({this.id, this.attributes}); factory CarResultDto.fromJson(Map json) => _$CarResultDtoFromJson(json); } @JsonSerializable(createToJson: false) class CarAttributesResultDto { @JsonKey(name: 'Model_ID') final String? modelid; @JsonKey(name: 'Make_Name') final String? makename; // Поле для make_and_model @JsonKey(name: 'Model_Name') final String? modelname; const CarAttributesResultDto({this.modelid, this.makename, this.modelname}); factory CarAttributesResultDto.fromJson(Map json) => _$CarAttributesResultDtoFromJson(json); }