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