toJson method
Returns the json representation of this model in the unsplash api.
Implementation
@override
Map<String, dynamic> toJson() {
return <String, dynamic>{
'id': id,
'created_at': createdAt.toIso8601String(),
'updated_at': updatedAt.toIso8601String(),
'urls': urls.toJson(),
'width': width,
'height': height,
'color': color,
'blur_hash': blurHash,
'downloads': downloads,
'likes': likes,
'liked_by_user': likedByUser,
'description': description,
'exif': exif?.toJson(),
'location': location?.toJson(),
'user': user.toJson(),
'current_user_collections':
currentUserCollections.map((it) => it.toJson()).toList(),
'links': links.toJson(),
'tags': tags?.map((tag) => tag.toJson()).toList(),
};
}