import 'package:json_annotation/json_annotation.dart'; part 'players_dto.g.dart'; @JsonSerializable(createToJson: false) class PlayersDto { final List? items; final PaginationDto? pagination; const PlayersDto({ this.items, this.pagination, }); factory PlayersDto.fromJson(Map json) => _$PlayersDtoFromJson(json); } @JsonSerializable(createToJson: false) class PlayerDataDto { final int? id; final String? firstName; final String? lastName; final String? commonName; final int? overallRating; final int? skillMoves; final int? weakFootAbility; final PlayerNationalityDataDto? nationality; final PlayerTeamDataDto? team; final PlayerPositionDataDto? position; final String? avatarUrl; final String? shieldUrl; const PlayerDataDto({this.id, this.firstName, this.lastName, this.commonName, this.overallRating, this.skillMoves, this.weakFootAbility, this.nationality, this.team, this.position, this.avatarUrl, this.shieldUrl}); factory PlayerDataDto.fromJson(Map json) => _$PlayerDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class PlayerNationalityDataDto { final String? label; final String? imageUrl; const PlayerNationalityDataDto(this.label, this.imageUrl); factory PlayerNationalityDataDto.fromJson(Map json) => _$PlayerNationalityDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class PlayerTeamDataDto { final String? label; final String? imageUrl; const PlayerTeamDataDto(this.label, this.imageUrl); factory PlayerTeamDataDto.fromJson(Map json) => _$PlayerTeamDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class PlayerPositionDataDto { final String? label; const PlayerPositionDataDto(this.label); factory PlayerPositionDataDto.fromJson(Map json) => _$PlayerPositionDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class PaginationDto { final int? offset; const PaginationDto({this.offset}); factory PaginationDto.fromJson(Map json) => _$PaginationDtoFromJson(json); }