toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data["id"] = this.id;
  data["width"] = this.width;
  data["height"] = this.height;
  data["url"] = this.url;
  data["photographer"] = this.photographer;
  data["photographer_url"] = this.photographerUrl;
  data["photographer_id"] = this.photographerId;
  data["avg_color"] = this.avgColor;
  if (this.src != null) data["src"] = this.src?.toJson();
  data["liked"] = this.liked;
  return data;
}