Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-12 17:23:51 +08:00
parent 448192b635
commit e98b2b69bb
3 changed files with 12 additions and 9 deletions

View File

@@ -7,7 +7,8 @@ class CardLiveItem {
String? uname;
String? face;
String? cover;
String? systemCover;
String? _systemCover;
String? get systemCover => _systemCover ?? cover;
String? title;
int? liveTime;
String? areaName;
@@ -23,7 +24,7 @@ class CardLiveItem {
this.uname,
this.face,
this.cover,
this.systemCover,
String? systemCover,
this.title,
this.liveTime,
this.areaName,
@@ -32,7 +33,7 @@ class CardLiveItem {
this.areaV2ParentName,
this.areaV2ParentId,
this.watchedShow,
});
}) : _systemCover = noneNullOrEmptyString(systemCover);
factory CardLiveItem.fromJson(Map<String, dynamic> json) => CardLiveItem(
roomid: json['roomid'] ?? json['id'],
@@ -40,7 +41,7 @@ class CardLiveItem {
uname: json['uname'] as String?,
face: json['face'] as String?,
cover: json['cover'] as String?,
systemCover: noneNullOrEmptyString(json['system_cover']),
systemCover: json['system_cover'],
title: json['title'] as String?,
liveTime: json['live_time'] as int?,
areaName: json['area_name'] as String?,