mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-08 20:14:51 +08:00
@@ -7,6 +7,7 @@ class SourceModel {
|
||||
final int? width;
|
||||
final int? height;
|
||||
final bool isLongPic;
|
||||
final num? size;
|
||||
|
||||
const SourceModel({
|
||||
this.sourceType = SourceType.networkImage,
|
||||
@@ -15,5 +16,6 @@ class SourceModel {
|
||||
this.width,
|
||||
this.height,
|
||||
this.isLongPic = false,
|
||||
this.size,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -44,7 +44,9 @@ class Pic {
|
||||
url = json['url'];
|
||||
width = (json['width'] as num?)?.toDouble();
|
||||
height = (json['height'] as num?)?.toDouble();
|
||||
size = json['size'];
|
||||
if (json['size'] case num size) {
|
||||
this.size = size * 1024;
|
||||
}
|
||||
pics = (json['pics'] as List?)?.map((item) => Pic.fromJson(item)).toList();
|
||||
style = json['style'];
|
||||
liveUrl = json['live_url'];
|
||||
|
||||
@@ -1200,7 +1200,9 @@ class OpusPicModel extends PicModel {
|
||||
src = json['src'];
|
||||
url = json['url'];
|
||||
liveUrl = json['live_url'];
|
||||
size = json['size'];
|
||||
if (json['size'] case num size) {
|
||||
this.size = size * 1024;
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
||||
Reference in New Issue
Block a user