SearchPhoto.fromJson constructor
SearchPhoto.fromJson Mapping data to SearchPhoto
Implementation
factory SearchPhoto.fromJson(Map<String, dynamic> json) {
/// [SearchPhoto] Mapping object
return SearchPhoto(
page: json['page'] as int?,
perPage: json['per_page'] as int?,
totalResults: json['total_results'] as int?,
nextPage: json['next_page'] as String?,
prevPage: json['prev_page'] as String?,
photos: _photoList(json['photos'] as List<dynamic>?));
}