mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
27 lines
454 B
Dart
27 lines
454 B
Dart
class Brief {
|
|
List<Img>? img;
|
|
|
|
Brief({
|
|
this.img,
|
|
});
|
|
|
|
factory Brief.fromJson(Map<String, dynamic> json) => Brief(
|
|
img: (json['img'] as List?)?.map((e) => Img.fromJson(e)).toList(),
|
|
);
|
|
}
|
|
|
|
class Img {
|
|
num aspectRatio;
|
|
String? url;
|
|
|
|
Img({
|
|
required this.aspectRatio,
|
|
this.url,
|
|
});
|
|
|
|
factory Img.fromJson(Map<String, dynamic> json) => Img(
|
|
aspectRatio: json['aspect_ratio'] ?? 1,
|
|
url: json['url'] as String?,
|
|
);
|
|
}
|