mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 20:16:26 +08:00
@@ -6,8 +6,8 @@ class Cursor {
|
||||
Cursor({this.isEnd, this.id, this.time});
|
||||
|
||||
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
|
||||
isEnd: json['is_end'] as bool?,
|
||||
id: json['id'] as int?,
|
||||
time: json['time'] as int?,
|
||||
);
|
||||
isEnd: json['is_end'] as bool?,
|
||||
id: json['id'] as int?,
|
||||
time: json['time'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ class MsgLikeData {
|
||||
MsgLikeData({this.latest, this.total});
|
||||
|
||||
factory MsgLikeData.fromJson(Map<String, dynamic> json) => MsgLikeData(
|
||||
latest: json['latest'] == null
|
||||
? null
|
||||
: Latest.fromJson(json['latest'] as Map<String, dynamic>),
|
||||
total: json['total'] == null
|
||||
? null
|
||||
: Total.fromJson(json['total'] as Map<String, dynamic>),
|
||||
);
|
||||
latest: json['latest'] == null
|
||||
? null
|
||||
: Latest.fromJson(json['latest'] as Map<String, dynamic>),
|
||||
total: json['total'] == null
|
||||
? null
|
||||
: Total.fromJson(json['total'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,15 +20,15 @@ class MsgLikeItem {
|
||||
});
|
||||
|
||||
factory MsgLikeItem.fromJson(Map<String, dynamic> json) => MsgLikeItem(
|
||||
id: json['id'] as int?,
|
||||
users: (json['users'] as List<dynamic>?)
|
||||
?.map((e) => User.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
item: json['item'] == null
|
||||
? null
|
||||
: MsgLikeContent.fromJson(json['item'] as Map<String, dynamic>),
|
||||
counts: json['counts'] as int?,
|
||||
likeTime: json['like_time'] as int?,
|
||||
noticeState: json['notice_state'] as int?,
|
||||
);
|
||||
id: json['id'] as int?,
|
||||
users: (json['users'] as List<dynamic>?)
|
||||
?.map((e) => User.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
item: json['item'] == null
|
||||
? null
|
||||
: MsgLikeContent.fromJson(json['item'] as Map<String, dynamic>),
|
||||
counts: json['counts'] as int?,
|
||||
likeTime: json['like_time'] as int?,
|
||||
noticeState: json['notice_state'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ class Latest {
|
||||
Latest({this.items, this.lastViewAt});
|
||||
|
||||
factory Latest.fromJson(Map<String, dynamic> json) => Latest(
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgLikeItem.fromJson(e))
|
||||
.toList(),
|
||||
lastViewAt: json['last_view_at'] as int?,
|
||||
);
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgLikeItem.fromJson(e))
|
||||
.toList(),
|
||||
lastViewAt: json['last_view_at'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ class Total {
|
||||
Total({this.cursor, this.items});
|
||||
|
||||
factory Total.fromJson(Map<String, dynamic> json) => Total(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgLikeItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgLikeItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ class User {
|
||||
});
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => User(
|
||||
mid: json['mid'] as int?,
|
||||
fans: json['fans'] as int?,
|
||||
nickname: json['nickname'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
midLink: json['mid_link'] as String?,
|
||||
follow: json['follow'] as bool?,
|
||||
);
|
||||
mid: json['mid'] as int?,
|
||||
fans: json['fans'] as int?,
|
||||
nickname: json['nickname'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
midLink: json['mid_link'] as String?,
|
||||
follow: json['follow'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user