import 'package:json_annotation/json_annotation.dart'; part 'titans_dto.g.dart'; @JsonSerializable(createToJson: false) class TitansDto { final List? results; final InfoDto? info; const TitansDto({this.results, this.info}); factory TitansDto.fromJson(Map json) => _$TitansDtoFromJson(json); } @JsonSerializable(createToJson: false) class TitansResultsDto { final String? id; final String? name; final String? height; final List? abilities; final String? allegiance; const TitansResultsDto({this.id, this.name, this.height, this.abilities, this.allegiance}); factory TitansResultsDto.fromJson(Map json) => _$CharactersDataDtoFromJson(json); }