PMD_labs/lib/data/dtos/titans_dto.dart
2024-12-20 18:13:20 +04:00

24 lines
726 B
Dart

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