mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 19:16:44 +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?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ class MsgReplyData {
|
||||
MsgReplyData({this.cursor, this.items, this.lastViewAt});
|
||||
|
||||
factory MsgReplyData.fromJson(Map<String, dynamic> json) => MsgReplyData(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgReplyItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
lastViewAt: json['last_view_at'] as int?,
|
||||
);
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgReplyItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
lastViewAt: json['last_view_at'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,15 +20,15 @@ class MsgReplyItem {
|
||||
});
|
||||
|
||||
factory MsgReplyItem.fromJson(Map<String, dynamic> json) => MsgReplyItem(
|
||||
id: json['id'] as int?,
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
item: json['item'] == null
|
||||
? null
|
||||
: MsgReplyContent.fromJson(json['item'] as Map<String, dynamic>),
|
||||
counts: json['counts'] as int?,
|
||||
isMulti: json['is_multi'] as int?,
|
||||
replyTime: json['reply_time'] as int?,
|
||||
);
|
||||
id: json['id'] as int?,
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
item: json['item'] == null
|
||||
? null
|
||||
: MsgReplyContent.fromJson(json['item'] as Map<String, dynamic>),
|
||||
counts: json['counts'] as int?,
|
||||
isMulti: json['is_multi'] as int?,
|
||||
replyTime: json['reply_time'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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