import 'dart:ffi'; import 'package:json_annotation/json_annotation.dart'; part 'characters_dto.g.dart'; @JsonSerializable(createToJson: false) class CharactersDto { final List? data; final MetaDto? meta; const CharactersDto({this.data, this.meta}); factory CharactersDto.fromJson(Map json) => _$CharactersDtoFromJson(json); } @JsonSerializable(createToJson: false) class CharacterDataDto { final String? model; final CharacterImagesDataDto? images; final int? price; final double? speed; final String id; const CharacterDataDto({this.model, this.images, this.price, this.speed, required this.id}); factory CharacterDataDto.fromJson(Map json) => _$CharacterDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class CharacterImagesDataDto { final String? frontQuarter; const CharacterImagesDataDto({this.frontQuarter}); factory CharacterImagesDataDto.fromJson(Map json) => _$CharacterImagesDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class MetaDto { final PaginationDto? pagination; const MetaDto({this.pagination}); factory MetaDto.fromJson(Map json) => _$MetaDtoFromJson(json); } @JsonSerializable(createToJson: false) class PaginationDto { final int? current; final int? next; final int? last; const PaginationDto({this.current, this.last, this.next}); factory PaginationDto.fromJson(Map json) => _$PaginationDtoFromJson(json); }