class ImageModel{ int id; String name; String url; String type; dynamic preview; int size; ImageModel({ this.id, this.name, this.url, this.type, this.preview, this.size, }); factory ImageModel.fromJson(Map json) => ImageModel( id: json["id"], name: json["name"], url: json["url"], type: json["type"], preview: json["preview"], size: json["size"], ); Map toJson() => { "id": id, "name": name, "url": url, "type": type, "preview": preview, "size": size, }; }