import 'car.dart'; import 'package:json_annotation/json_annotation.dart'; part 'car_get_response.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class CarGetResponseDTO { CarGetResponseDTO( {required this.succeeded, required this.message, required this.cars}); final bool succeeded; final String message; final List? cars; factory CarGetResponseDTO.fromJson(Map json) => _$CarGetResponseDTOFromJson(json); Map toJson() => _$CarGetResponseDTOToJson(this); }