class CardImages { int id; String url; int cardId; CardImages({ required this.id, required this.url, required this.cardId, }); factory CardImages.fromJson(Map json) => CardImages( id: json["id"], url: json["url"], cardId: json["card_id"], ); static List fromJsonList(Map json) { List images = []; json["card_images"].forEach( (element) => images.add( CardImages.fromJson(element), ), ); return images; } }