PeopleTaggedImagesResult.fromMap constructor
PeopleTaggedImagesResult.fromMap(
- Map<String, dynamic> json
)
Implementation
factory PeopleTaggedImagesResult.fromMap(Map<String, dynamic> json) =>
PeopleTaggedImagesResult(
aspectRatio: double.tryParse(
json['aspect_ratio'] as String? ?? '',
) ??
0,
filePath: json['file_path'] as String? ?? '',
height: json['height'] as int? ?? 0,
id: json['id'] as String? ?? '',
iso6391: json['iso_639_1'] as String? ?? '',
voteAverage: double.tryParse(
json['vote_average'] as String? ?? '',
) ??
0,
voteCount: json['vote_count'] as int? ?? 0,
width: json['width'] as int? ?? 0,
imageType: json['image_type'] as String? ?? '',
media: PersonDetailsCast.fromMap(
json['media'] as Map<String, dynamic>? ?? <String, dynamic>{},
),
mediaType: json['media_type'] as String? ?? '',
);