import 'package:json_annotation/json_annotation.dart'; part 'PlaceDTO.g.dart'; @JsonSerializable(createToJson: false) class PlacesDto { final List? data; const PlacesDto({this.data}); factory PlacesDto.fromJson(Map json) => _$PlacesDtoFromJson(json); } @JsonSerializable(createToJson: false) class PlaceDataDto { final int? id; final String? name; final int? yearBuilt; final String? description; final String? imageData; const PlaceDataDto({this.id, this.name, this.yearBuilt, this.description, this.imageData}); factory PlaceDataDto.fromJson(Map json) => _$PlaceDataDtoFromJson(json); }