fix: msg page layout

This commit is contained in:
guozhigq
2024-10-28 23:58:58 +08:00
parent 3e630334ca
commit c0190a526f
5 changed files with 49 additions and 45 deletions

View File

@ -39,7 +39,7 @@ class Total {
List<MessageLikeItem>? items;
factory Total.fromJson(Map<String, dynamic> json) => Total(
cursor: Cursor.fromJson(json['cursor']),
cursor: json['cursor'] != null ? Cursor.fromJson(json['cursor']) : null,
items: json["items"] == null
? []
: json["items"].map<MessageLikeItem>((e) {

View File

@ -13,8 +13,9 @@ class SessionDataModel {
SessionDataModel.fromJson(Map<String, dynamic> json) {
sessionList = json['session_list']
?.map<SessionList>((e) => SessionList.fromJson(e))
.toList();
?.map<SessionList>((e) => SessionList.fromJson(e))
.toList() ??
[];
hasMore = json['has_more'];
}
}