54 lines
1.9 KiB
Dart
54 lines
1.9 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'movies_dto.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
MoviesDto _$MoviesDtoFromJson(Map<String, dynamic> json) => MoviesDto(
|
|
docs: (json['docs'] as List<dynamic>?)
|
|
?.map((e) => MovieDataDto.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
pagination: json['pagination'] == null
|
|
? null
|
|
: MoviePaginationDto.fromJson(
|
|
json['pagination'] as Map<String, dynamic>),
|
|
);
|
|
|
|
MoviePaginationDto _$MoviePaginationDtoFromJson(Map<String, dynamic> json) =>
|
|
MoviePaginationDto(
|
|
currentPage: (json['current_page'] as num?)?.toInt(),
|
|
hasNextPage: json['has_next_page'] as bool?,
|
|
lastVisiblePage: (json['last_visible_page'] as num?)?.toInt(),
|
|
);
|
|
|
|
MovieDataDto _$MovieDataDtoFromJson(Map<String, dynamic> json) => MovieDataDto(
|
|
json['name'] as String?,
|
|
json['description'] as String?,
|
|
json['poster'] == null
|
|
? null
|
|
: PosterDto.fromJson(json['poster'] as Map<String, dynamic>),
|
|
id: (json['id'] as num?)?.toInt(),
|
|
year: (json['year'] as num?)?.toInt() ?? 0,
|
|
genres: (json['genres'] as List<dynamic>?)
|
|
?.map((e) => GenreDto.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
countries: (json['countries'] as List<dynamic>?)
|
|
?.map((e) => CountryDto.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
);
|
|
|
|
GenreDto _$GenreDtoFromJson(Map<String, dynamic> json) => GenreDto(
|
|
name: json['name'] as String?,
|
|
);
|
|
|
|
CountryDto _$CountryDtoFromJson(Map<String, dynamic> json) => CountryDto(
|
|
name: json['name'] as String?,
|
|
);
|
|
|
|
PosterDto _$PosterDtoFromJson(Map<String, dynamic> json) => PosterDto(
|
|
url: json['url'] as String?,
|
|
previewUrl: json['previewUrl'] as String?,
|
|
);
|