pmu_flutter/lec5/lib/data/dto/characters_dto.g.dart

49 lines
1.6 KiB
Dart
Raw Normal View History

2024-10-11 19:12:12 +04:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'characters_dto.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
CharactersDto _$CharactersDtoFromJson(Map<String, dynamic> json) =>
CharactersDto(
data: (json['data'] as List<dynamic>?)
?.map((e) => CharacterDto.fromJson(e as Map<String, dynamic>))
.toList(),
meta: json['meta'] == null
? null
: MetaDto.fromJson(json['meta'] as Map<String, dynamic>),
);
MetaDto _$MetaDtoFromJson(Map<String, dynamic> json) => MetaDto(
pagination: json['pagination'] == null
? null
: PaginationDto.fromJson(json['pagination'] as Map<String, dynamic>),
);
PaginationDto _$PaginationDtoFromJson(Map<String, dynamic> json) =>
PaginationDto(
current: (json['current'] as num?)?.toInt(),
next: (json['next'] as num?)?.toInt(),
last: (json['last'] as num?)?.toInt(),
);
CharacterDto _$CharacterDtoFromJson(Map<String, dynamic> json) => CharacterDto(
id: json['id'] as String?,
type: json['type'] as String?,
attributes: json['attributes'] == null
? null
: CharacterAttributesDto.fromJson(
json['attributes'] as Map<String, dynamic>),
);
CharacterAttributesDto _$CharacterAttributesDtoFromJson(
Map<String, dynamic> json) =>
CharacterAttributesDto(
name: json['name'] as String?,
born: json['born'] as String?,
died: json['died'] as String?,
image: json['image'] as String?,
);