Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:47:11 +08:00
parent 148e0872b4
commit 418a1e8d39
821 changed files with 29467 additions and 25520 deletions

View File

@@ -20,15 +20,15 @@ class AreaItem {
});
factory AreaItem.fromJson(Map<String, dynamic> json) => AreaItem(
id: json['id'],
name: json['name'] as String?,
link: json['link'] as String?,
pic: json['pic'] as String?,
parentId: json['parent_id'],
parentName: json['parent_name'] as String?,
areaType: json['area_type'] as int?,
tagType: json['tag_type'] as int?,
);
id: json['id'],
name: json['name'] as String?,
link: json['link'] as String?,
pic: json['pic'] as String?,
parentId: json['parent_id'],
parentName: json['parent_name'] as String?,
areaType: json['area_type'] as int?,
tagType: json['tag_type'] as int?,
);
@override
bool operator ==(Object other) {

View File

@@ -9,11 +9,11 @@ class AreaList {
AreaList({this.id, this.name, this.parentAreaType, this.areaList});
factory AreaList.fromJson(Map<String, dynamic> json) => AreaList(
id: json['id'] as int?,
name: json['name'] ?? '',
parentAreaType: json['parent_area_type'] as int?,
areaList: (json['area_list'] as List<dynamic>?)
?.map((e) => AreaItem.fromJson(e as Map<String, dynamic>))
.toList(),
);
id: json['id'] as int?,
name: json['name'] ?? '',
parentAreaType: json['parent_area_type'] as int?,
areaList: (json['area_list'] as List<dynamic>?)
?.map((e) => AreaItem.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -17,15 +17,14 @@ class ShieldInfo {
});
factory ShieldInfo.fromJson(Map<String, dynamic> json) => ShieldInfo(
shieldUserList: (json['shield_user_list'] as List<dynamic>?)
?.map((e) => ShieldUserList.fromJson(e as Map<String, dynamic>))
.toList(),
keywordList: (json['keyword_list'] as List?)?.cast(),
shieldRules: json['shield_rules'] == null
? null
: ShieldRules.fromJson(
json['shield_rules'] as Map<String, dynamic>),
isBlock: json['is_block'] as bool?,
blockExpired: json['block_expired'] as int?,
);
shieldUserList: (json['shield_user_list'] as List<dynamic>?)
?.map((e) => ShieldUserList.fromJson(e as Map<String, dynamic>))
.toList(),
keywordList: (json['keyword_list'] as List?)?.cast(),
shieldRules: json['shield_rules'] == null
? null
: ShieldRules.fromJson(json['shield_rules'] as Map<String, dynamic>),
isBlock: json['is_block'] as bool?,
blockExpired: json['block_expired'] as int?,
);
}

View File

@@ -6,8 +6,8 @@ class ShieldRules {
ShieldRules({this.rank = 0, this.verify = 0, this.level = 0});
factory ShieldRules.fromJson(Map<String, dynamic> json) => ShieldRules(
rank: json['rank'] as int? ?? 0,
verify: json['verify'] as int? ?? 0,
level: json['level'] as int? ?? 0,
);
rank: json['rank'] as int? ?? 0,
verify: json['verify'] as int? ?? 0,
level: json['level'] as int? ?? 0,
);
}

View File

@@ -20,14 +20,14 @@ class LiveDmInfoData {
});
factory LiveDmInfoData.fromJson(Map<String, dynamic> json) => LiveDmInfoData(
group: json['group'] as String?,
businessId: json['business_id'] as int?,
refreshRowFactor: (json['refresh_row_factor'] as num?)?.toDouble(),
refreshRate: json['refresh_rate'] as int?,
maxDelay: json['max_delay'] as int?,
token: json['token'] as String?,
hostList: (json['host_list'] as List<dynamic>?)
?.map((e) => HostList.fromJson(e as Map<String, dynamic>))
.toList(),
);
group: json['group'] as String?,
businessId: json['business_id'] as int?,
refreshRowFactor: (json['refresh_row_factor'] as num?)?.toDouble(),
refreshRate: json['refresh_rate'] as int?,
maxDelay: json['max_delay'] as int?,
token: json['token'] as String?,
hostList: (json['host_list'] as List<dynamic>?)
?.map((e) => HostList.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -7,9 +7,9 @@ class HostList {
HostList({this.host, this.port, this.wssPort, this.wsPort});
factory HostList.fromJson(Map<String, dynamic> json) => HostList(
host: json['host'] as String?,
port: json['port'] as int?,
wssPort: json['wss_port'] as int?,
wsPort: json['ws_port'] as int?,
);
host: json['host'] as String?,
port: json['port'] as int?,
wssPort: json['wss_port'] as int?,
wsPort: json['ws_port'] as int?,
);
}

View File

@@ -6,8 +6,8 @@ class LiveEmoteData {
LiveEmoteData({this.data});
factory LiveEmoteData.fromJson(Map<String, dynamic> json) => LiveEmoteData(
data: (json['data'] as List<dynamic>?)
?.map((e) => LiveEmoteDatum.fromJson(e as Map<String, dynamic>))
.toList(),
);
data: (json['data'] as List<dynamic>?)
?.map((e) => LiveEmoteDatum.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -12,10 +12,10 @@ class LiveEmoteDatum {
});
factory LiveEmoteDatum.fromJson(Map<String, dynamic> json) => LiveEmoteDatum(
emoticons: (json['emoticons'] as List<dynamic>?)
?.map((e) => Emoticon.fromJson(e as Map<String, dynamic>))
.toList(),
pkgType: json['pkg_type'] as int?,
currentCover: json['current_cover'] as String?,
);
emoticons: (json['emoticons'] as List<dynamic>?)
?.map((e) => Emoticon.fromJson(e as Map<String, dynamic>))
.toList(),
pkgType: json['pkg_type'] as int?,
currentCover: json['current_cover'] as String?,
);
}

View File

@@ -14,10 +14,10 @@ class Emoticon {
});
factory Emoticon.fromJson(Map<String, dynamic> json) => Emoticon(
emoji: json['emoji'] as String?,
url: json['url'] as String?,
width: json['width'] as int?,
height: json['height'] as int?,
emoticonUnique: json['emoticon_unique'] as String?,
);
emoji: json['emoji'] as String?,
url: json['url'] as String?,
width: json['width'] as int?,
height: json['height'] as int?,
emoticonUnique: json['emoticon_unique'] as String?,
);
}

View File

@@ -15,19 +15,19 @@ class CardData {
});
factory CardData.fromJson(Map<String, dynamic> json) => CardData(
bannerV2: json['banner_v2'] == null
? null
: CardDataItem.fromJson(json['banner_v2'] as Map<String, dynamic>),
myIdolV1: json['my_idol_v1'] == null
? null
: CardDataItem.fromJson(json['my_idol_v1'] as Map<String, dynamic>),
areaEntranceV3: json['area_entrance_v3'] == null
? null
: CardDataItem.fromJson(
json['area_entrance_v3'] as Map<String, dynamic>),
smallCardV1: json['small_card_v1'] == null
? null
: CardLiveItem.fromJson(
json['small_card_v1'] as Map<String, dynamic>),
);
bannerV2: json['banner_v2'] == null
? null
: CardDataItem.fromJson(json['banner_v2'] as Map<String, dynamic>),
myIdolV1: json['my_idol_v1'] == null
? null
: CardDataItem.fromJson(json['my_idol_v1'] as Map<String, dynamic>),
areaEntranceV3: json['area_entrance_v3'] == null
? null
: CardDataItem.fromJson(
json['area_entrance_v3'] as Map<String, dynamic>,
),
smallCardV1: json['small_card_v1'] == null
? null
: CardLiveItem.fromJson(json['small_card_v1'] as Map<String, dynamic>),
);
}

View File

@@ -15,17 +15,17 @@ class CardDataItem {
});
factory CardDataItem.fromJson(Map<String, dynamic> json) => CardDataItem(
moduleInfo: json['module_info'] == null
? null
: ModuleInfo.fromJson(json['module_info'] as Map<String, dynamic>),
list: (json['list'] as List<dynamic>?)
?.map((e) => CardLiveItem.fromJson(e as Map<String, dynamic>))
.toList(),
topView: json['top_view'] as dynamic,
extraInfo: json['extra_info'] == null
? null
: ExtraInfo.fromJson(json['extra_info'] as Map<String, dynamic>),
);
moduleInfo: json['module_info'] == null
? null
: ModuleInfo.fromJson(json['module_info'] as Map<String, dynamic>),
list: (json['list'] as List<dynamic>?)
?.map((e) => CardLiveItem.fromJson(e as Map<String, dynamic>))
.toList(),
topView: json['top_view'] as dynamic,
extraInfo: json['extra_info'] == null
? null
: ExtraInfo.fromJson(json['extra_info'] as Map<String, dynamic>),
);
}
class ExtraInfo {

View File

@@ -48,29 +48,28 @@ class CardLiveItem {
});
factory CardLiveItem.fromJson(Map<String, dynamic> json) => CardLiveItem(
roomid: json['roomid'] ?? json['id'],
uid: json['uid'] as int?,
uname: json['uname'] as String?,
face: json['face'] as String?,
cover: json['cover'] as String?,
title: json['title'] as String?,
area: json['area'] as int?,
liveTime: json['live_time'] as int?,
areaName: json['area_name'] as String?,
areaV2Id: json['area_v2_id'] as int?,
areaV2Name: json['area_v2_name'] as String?,
areaV2ParentName: json['area_v2_parent_name'] as String?,
areaV2ParentId: json['area_v2_parent_id'] as int?,
liveTagName: json['live_tag_name'] as String?,
online: json['online'] as int?,
link: json['link'] as String?,
officialVerify: json['official_verify'] as int?,
currentQn: json['current_qn'] as int?,
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(
json['watched_show'] as Map<String, dynamic>),
statusText: json['status_text'] as String?,
tagType: json['tag_type'],
);
roomid: json['roomid'] ?? json['id'],
uid: json['uid'] as int?,
uname: json['uname'] as String?,
face: json['face'] as String?,
cover: json['cover'] as String?,
title: json['title'] as String?,
area: json['area'] as int?,
liveTime: json['live_time'] as int?,
areaName: json['area_name'] as String?,
areaV2Id: json['area_v2_id'] as int?,
areaV2Name: json['area_v2_name'] as String?,
areaV2ParentName: json['area_v2_parent_name'] as String?,
areaV2ParentId: json['area_v2_parent_id'] as int?,
liveTagName: json['live_tag_name'] as String?,
online: json['online'] as int?,
link: json['link'] as String?,
officialVerify: json['official_verify'] as int?,
currentQn: json['current_qn'] as int?,
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(json['watched_show'] as Map<String, dynamic>),
statusText: json['status_text'] as String?,
tagType: json['tag_type'],
);
}

View File

@@ -7,9 +7,9 @@ class LiveCardList {
LiveCardList({this.cardType, this.cardData});
factory LiveCardList.fromJson(Map<String, dynamic> json) => LiveCardList(
cardType: json['card_type'] as String?,
cardData: json['card_data'] == null
? null
: CardData.fromJson(json['card_data'] as Map<String, dynamic>),
);
cardType: json['card_type'] as String?,
cardData: json['card_data'] == null
? null
: CardData.fromJson(json['card_data'] as Map<String, dynamic>),
);
}

View File

@@ -9,11 +9,11 @@ class LiveFeedIndex {
LiveFeedIndex({this.code, this.message, this.ttl, this.data});
factory LiveFeedIndex.fromJson(Map<String, dynamic> json) => LiveFeedIndex(
code: json['code'] as int?,
message: json['message'] as String?,
ttl: json['ttl'] as int?,
data: json['data'] == null
? null
: LiveIndexData.fromJson(json['data'] as Map<String, dynamic>),
);
code: json['code'] as int?,
message: json['message'] as String?,
ttl: json['ttl'] as int?,
data: json['data'] == null
? null
: LiveIndexData.fromJson(json['data'] as Map<String, dynamic>),
);
}

View File

@@ -18,12 +18,12 @@ class ModuleInfo {
});
factory ModuleInfo.fromJson(Map<String, dynamic> json) => ModuleInfo(
id: json['id'] as int?,
link: json['link'] as String?,
pic: json['pic'] as String?,
title: json['title'] as String?,
type: json['type'] as int?,
sort: json['sort'] as int?,
count: json['count'] as int?,
);
id: json['id'] as int?,
link: json['link'] as String?,
pic: json['pic'] as String?,
title: json['title'] as String?,
type: json['type'] as int?,
sort: json['sort'] as int?,
count: json['count'] as int?,
);
}

View File

@@ -8,7 +8,7 @@ class WatchedShow {
});
factory WatchedShow.fromJson(Map<String, dynamic> json) => WatchedShow(
textSmall: json['text_small'] as String?,
textLarge: json['text_large'] as String?,
);
textSmall: json['text_small'] as String?,
textLarge: json['text_large'] as String?,
);
}

View File

@@ -54,30 +54,30 @@ class LiveFollowItem {
});
factory LiveFollowItem.fromJson(Map<String, dynamic> json) => LiveFollowItem(
roomid: json['roomid'] as int?,
uid: json['uid'] as int?,
uname: json['uname'] as String?,
title: json['title'] as String?,
face: json['face'] as String?,
liveStatus: json['live_status'] as int?,
recordNum: json['record_num'] as int?,
recentRecordId: json['recent_record_id'] as String?,
isAttention: json['is_attention'] as int?,
clipnum: json['clipnum'] as int?,
fansNum: json['fans_num'] as int?,
areaName: json['area_name'] as String?,
areaValue: json['area_value'] as String?,
tags: json['tags'] as String?,
recentRecordIdV2: json['recent_record_id_v2'] as String?,
recordNumV2: json['record_num_v2'] as int?,
recordLiveTime: json['record_live_time'] as int?,
areaNameV2: json['area_name_v2'] as String?,
roomNews: json['room_news'] as String?,
sw1tch: json['switch'] as bool?,
watchIcon: json['watch_icon'] as String?,
textSmall: json['text_small'] as String?,
roomCover: json['room_cover'] as String?,
parentAreaId: json['parent_area_id'] as int?,
areaId: json['area_id'] as int?,
);
roomid: json['roomid'] as int?,
uid: json['uid'] as int?,
uname: json['uname'] as String?,
title: json['title'] as String?,
face: json['face'] as String?,
liveStatus: json['live_status'] as int?,
recordNum: json['record_num'] as int?,
recentRecordId: json['recent_record_id'] as String?,
isAttention: json['is_attention'] as int?,
clipnum: json['clipnum'] as int?,
fansNum: json['fans_num'] as int?,
areaName: json['area_name'] as String?,
areaValue: json['area_value'] as String?,
tags: json['tags'] as String?,
recentRecordIdV2: json['recent_record_id_v2'] as String?,
recordNumV2: json['record_num_v2'] as int?,
recordLiveTime: json['record_live_time'] as int?,
areaNameV2: json['area_name_v2'] as String?,
roomNews: json['room_news'] as String?,
sw1tch: json['switch'] as bool?,
watchIcon: json['watch_icon'] as String?,
textSmall: json['text_small'] as String?,
roomCover: json['room_cover'] as String?,
parentAreaId: json['parent_area_id'] as int?,
areaId: json['area_id'] as int?,
);
}

View File

@@ -8,12 +8,11 @@ class AnchorInfo {
AnchorInfo({this.baseInfo, this.relationInfo});
factory AnchorInfo.fromJson(Map<String, dynamic> json) => AnchorInfo(
baseInfo: json['base_info'] == null
? null
: BaseInfo.fromJson(json['base_info'] as Map<String, dynamic>),
relationInfo: json['relation_info'] == null
? null
: RelationInfo.fromJson(
json['relation_info'] as Map<String, dynamic>),
);
baseInfo: json['base_info'] == null
? null
: BaseInfo.fromJson(json['base_info'] as Map<String, dynamic>),
relationInfo: json['relation_info'] == null
? null
: RelationInfo.fromJson(json['relation_info'] as Map<String, dynamic>),
);
}

View File

@@ -6,8 +6,8 @@ class AreaMaskInfo {
AreaMaskInfo({this.areaMasks});
factory AreaMaskInfo.fromJson(Map<String, dynamic> json) => AreaMaskInfo(
areaMasks: json['area_masks'] == null
? null
: AreaMasks.fromJson(json['area_masks'] as Map<String, dynamic>),
);
areaMasks: json['area_masks'] == null
? null
: AreaMasks.fromJson(json['area_masks'] as Map<String, dynamic>),
);
}

View File

@@ -6,8 +6,8 @@ class AreaMasks {
AreaMasks({this.horizontalMasks, this.verticalMasks, this.fullMask});
factory AreaMasks.fromJson(Map<String, dynamic> json) => AreaMasks(
horizontalMasks: json['horizontal_masks'] as dynamic,
verticalMasks: json['vertical_masks'] as dynamic,
fullMask: json['full_mask'] as dynamic,
);
horizontalMasks: json['horizontal_masks'] as dynamic,
verticalMasks: json['vertical_masks'] as dynamic,
fullMask: json['full_mask'] as dynamic,
);
}

View File

@@ -8,11 +8,10 @@ class BaseInfo {
BaseInfo({this.uname, this.face, this.officialInfo});
factory BaseInfo.fromJson(Map<String, dynamic> json) => BaseInfo(
uname: json['uname'] as String?,
face: json['face'] as String?,
officialInfo: json['official_info'] == null
? null
: OfficialInfo.fromJson(
json['official_info'] as Map<String, dynamic>),
);
uname: json['uname'] as String?,
face: json['face'] as String?,
officialInfo: json['official_info'] == null
? null
: OfficialInfo.fromJson(json['official_info'] as Map<String, dynamic>),
);
}

View File

@@ -6,8 +6,8 @@ class BlockInfo {
BlockInfo({this.block, this.desc, this.business});
factory BlockInfo.fromJson(Map<String, dynamic> json) => BlockInfo(
block: json['block'] as bool?,
desc: json['desc'] as String?,
business: json['business'] as int?,
);
block: json['block'] as bool?,
desc: json['desc'] as String?,
business: json['business'] as int?,
);
}

View File

@@ -36,35 +36,34 @@ class RoomInfoH5Data {
});
factory RoomInfoH5Data.fromJson(Map<String, dynamic> json) => RoomInfoH5Data(
roomInfo: json['room_info'] == null
? null
: RoomInfo.fromJson(json['room_info'] as Map<String, dynamic>),
anchorInfo: json['anchor_info'] == null
? null
: AnchorInfo.fromJson(json['anchor_info'] as Map<String, dynamic>),
newSwitchInfo: json['new_switch_info'] == null
? null
: NewSwitchInfo.fromJson(
json['new_switch_info'] as Map<String, dynamic>),
bannerInfo: json['banner_info'] as List<dynamic>?,
isRoomFeed: json['is_room_feed'] as int?,
tabInfo: json['tab_info'] as List<dynamic>?,
newsInfo: json['news_info'] == null
? null
: NewsInfo.fromJson(json['news_info'] as Map<String, dynamic>),
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(
json['watched_show'] as Map<String, dynamic>),
likeInfoV3: json['like_info_v3'] == null
? null
: LikeInfoV3.fromJson(json['like_info_v3'] as Map<String, dynamic>),
blockInfo: json['block_info'] == null
? null
: BlockInfo.fromJson(json['block_info'] as Map<String, dynamic>),
areaMaskInfo: json['area_mask_info'] == null
? null
: AreaMaskInfo.fromJson(
json['area_mask_info'] as Map<String, dynamic>),
);
roomInfo: json['room_info'] == null
? null
: RoomInfo.fromJson(json['room_info'] as Map<String, dynamic>),
anchorInfo: json['anchor_info'] == null
? null
: AnchorInfo.fromJson(json['anchor_info'] as Map<String, dynamic>),
newSwitchInfo: json['new_switch_info'] == null
? null
: NewSwitchInfo.fromJson(
json['new_switch_info'] as Map<String, dynamic>,
),
bannerInfo: json['banner_info'] as List<dynamic>?,
isRoomFeed: json['is_room_feed'] as int?,
tabInfo: json['tab_info'] as List<dynamic>?,
newsInfo: json['news_info'] == null
? null
: NewsInfo.fromJson(json['news_info'] as Map<String, dynamic>),
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(json['watched_show'] as Map<String, dynamic>),
likeInfoV3: json['like_info_v3'] == null
? null
: LikeInfoV3.fromJson(json['like_info_v3'] as Map<String, dynamic>),
blockInfo: json['block_info'] == null
? null
: BlockInfo.fromJson(json['block_info'] as Map<String, dynamic>),
areaMaskInfo: json['area_mask_info'] == null
? null
: AreaMaskInfo.fromJson(json['area_mask_info'] as Map<String, dynamic>),
);
}

View File

@@ -6,8 +6,8 @@ class Frame {
Frame({this.name, this.value, this.desc});
factory Frame.fromJson(Map<String, dynamic> json) => Frame(
name: json['name'] as String?,
value: json['value'] as String?,
desc: json['desc'] as String?,
);
name: json['name'] as String?,
value: json['value'] as String?,
desc: json['desc'] as String?,
);
}

View File

@@ -44,25 +44,25 @@ class LikeInfoV3 {
});
factory LikeInfoV3.fromJson(Map<String, dynamic> json) => LikeInfoV3(
totalLikes: json['total_likes'] as int?,
clickBlock: json['click_block'] as bool?,
countBlock: json['count_block'] as bool?,
guildEmoText: json['guild_emo_text'] as String?,
guildDmText: json['guild_dm_text'] as String?,
likeDmText: json['like_dm_text'] as String?,
handIcons: (json['hand_icons'] as List?)?.cast(),
dmIcons: (json['dm_icons'] as List?)?.cast(),
eggshellsIcon: json['eggshells_icon'] as String?,
countShowTime: json['count_show_time'] as int?,
processIcon: json['process_icon'] as String?,
processColor: json['process_color'] as String?,
reportClickLimit: json['report_click_limit'] as int?,
reportTimeMin: json['report_time_min'] as int?,
reportTimeMax: json['report_time_max'] as int?,
icon: json['icon'] as String?,
cooldown: (json['cooldown'] as num?)?.toDouble(),
handUseFace: json['hand_use_face'] as bool?,
guideIconUrls: (json['guide_icon_urls'] as List?)?.cast(),
guideIconRatio: (json['guide_icon_ratio'] as num?)?.toDouble(),
);
totalLikes: json['total_likes'] as int?,
clickBlock: json['click_block'] as bool?,
countBlock: json['count_block'] as bool?,
guildEmoText: json['guild_emo_text'] as String?,
guildDmText: json['guild_dm_text'] as String?,
likeDmText: json['like_dm_text'] as String?,
handIcons: (json['hand_icons'] as List?)?.cast(),
dmIcons: (json['dm_icons'] as List?)?.cast(),
eggshellsIcon: json['eggshells_icon'] as String?,
countShowTime: json['count_show_time'] as int?,
processIcon: json['process_icon'] as String?,
processColor: json['process_color'] as String?,
reportClickLimit: json['report_click_limit'] as int?,
reportTimeMin: json['report_time_min'] as int?,
reportTimeMax: json['report_time_max'] as int?,
icon: json['icon'] as String?,
cooldown: (json['cooldown'] as num?)?.toDouble(),
handUseFace: json['hand_use_face'] as bool?,
guideIconUrls: (json['guide_icon_urls'] as List?)?.cast(),
guideIconRatio: (json['guide_icon_ratio'] as num?)?.toDouble(),
);
}

View File

@@ -16,11 +16,11 @@ class NewSwitchInfo {
});
factory NewSwitchInfo.fromJson(Map<String, dynamic> json) => NewSwitchInfo(
roomInfoPopularity: json['room-info-popularity'] as int?,
roomTab: json['room-tab'] as int?,
roomPlayerWatermark: json['room-player-watermark'] as int?,
roomRecommendLiveOff: json['room-recommend-live_off'] as int?,
brandUserCardSwitch: json['brand-user-card-switch'] as int?,
brandFollowSwitch: json['brand-follow-switch'] as int?,
);
roomInfoPopularity: json['room-info-popularity'] as int?,
roomTab: json['room-tab'] as int?,
roomPlayerWatermark: json['room-player-watermark'] as int?,
roomRecommendLiveOff: json['room-recommend-live_off'] as int?,
brandUserCardSwitch: json['brand-user-card-switch'] as int?,
brandFollowSwitch: json['brand-follow-switch'] as int?,
);
}

View File

@@ -6,8 +6,8 @@ class NewsInfo {
NewsInfo({this.uid, this.ctime, this.content});
factory NewsInfo.fromJson(Map<String, dynamic> json) => NewsInfo(
uid: json['uid'] as int?,
ctime: json['ctime'] as String?,
content: json['content'] as String?,
);
uid: json['uid'] as int?,
ctime: json['ctime'] as String?,
content: json['content'] as String?,
);
}

View File

@@ -14,10 +14,10 @@ class OfficialInfo {
});
factory OfficialInfo.fromJson(Map<String, dynamic> json) => OfficialInfo(
role: json['role'] as int?,
title: json['title'] as String?,
desc: json['desc'] as String?,
isNft: json['is_nft'] as int?,
nftDmark: json['nft_dmark'] as String?,
);
role: json['role'] as int?,
title: json['title'] as String?,
desc: json['desc'] as String?,
isNft: json['is_nft'] as int?,
nftDmark: json['nft_dmark'] as String?,
);
}

View File

@@ -6,8 +6,8 @@ class Pendants {
Pendants({this.frame});
factory Pendants.fromJson(Map<String, dynamic> json) => Pendants(
frame: json['frame'] == null
? null
: Frame.fromJson(json['frame'] as Map<String, dynamic>),
);
frame: json['frame'] == null
? null
: Frame.fromJson(json['frame'] as Map<String, dynamic>),
);
}

View File

@@ -4,6 +4,6 @@ class RelationInfo {
RelationInfo({this.attention});
factory RelationInfo.fromJson(Map<String, dynamic> json) => RelationInfo(
attention: json['attention'] as int?,
);
attention: json['attention'] as int?,
);
}

View File

@@ -42,25 +42,25 @@ class RoomInfo {
});
factory RoomInfo.fromJson(Map<String, dynamic> json) => RoomInfo(
uid: json['uid'] as int?,
roomId: json['room_id'] as int?,
title: json['title'] as String?,
cover: json['cover'] as String?,
description: json['description'] as String?,
liveStatus: json['live_status'] as int?,
liveStartTime: json['live_start_time'] as int?,
areaId: json['area_id'] as int?,
areaName: json['area_name'] as String?,
parentAreaId: json['parent_area_id'] as int?,
parentAreaName: json['parent_area_name'] as String?,
online: json['online'] as int?,
keyframe: json['keyframe'] as String?,
background: json['background'] as String?,
appBackground: json['app_background'] as String?,
pendants: json['pendants'] == null
? null
: Pendants.fromJson(json['pendants'] as Map<String, dynamic>),
subSessionKey: json['sub_session_key'] as String?,
liveId: json['live_id'] as String?,
);
uid: json['uid'] as int?,
roomId: json['room_id'] as int?,
title: json['title'] as String?,
cover: json['cover'] as String?,
description: json['description'] as String?,
liveStatus: json['live_status'] as int?,
liveStartTime: json['live_start_time'] as int?,
areaId: json['area_id'] as int?,
areaName: json['area_name'] as String?,
parentAreaId: json['parent_area_id'] as int?,
parentAreaName: json['parent_area_name'] as String?,
online: json['online'] as int?,
keyframe: json['keyframe'] as String?,
background: json['background'] as String?,
appBackground: json['app_background'] as String?,
pendants: json['pendants'] == null
? null
: Pendants.fromJson(json['pendants'] as Map<String, dynamic>),
subSessionKey: json['sub_session_key'] as String?,
liveId: json['live_id'] as String?,
);
}

View File

@@ -24,16 +24,16 @@ class CodecItem {
});
factory CodecItem.fromJson(Map<String, dynamic> json) => CodecItem(
codecName: json['codec_name'] as String?,
currentQn: json['current_qn'] as int?,
acceptQn: (json['accept_qn'] as List?)?.cast(),
baseUrl: json['base_url'] as String?,
urlInfo: (json['url_info'] as List<dynamic>?)
?.map((e) => UrlInfo.fromJson(e as Map<String, dynamic>))
.toList(),
hdrQn: json['hdr_qn'] as dynamic,
dolbyType: json['dolby_type'] as int?,
attrName: json['attr_name'] as String?,
hdrType: json['hdr_type'] as int?,
);
codecName: json['codec_name'] as String?,
currentQn: json['current_qn'] as int?,
acceptQn: (json['accept_qn'] as List?)?.cast(),
baseUrl: json['base_url'] as String?,
urlInfo: (json['url_info'] as List<dynamic>?)
?.map((e) => UrlInfo.fromJson(e as Map<String, dynamic>))
.toList(),
hdrQn: json['hdr_qn'] as dynamic,
dolbyType: json['dolby_type'] as int?,
attrName: json['attr_name'] as String?,
hdrType: json['hdr_type'] as int?,
);
}

View File

@@ -66,7 +66,8 @@ class RoomPlayInfoData {
playurlInfo: json['playurl_info'] == null
? null
: PlayurlInfo.fromJson(
json['playurl_info'] as Map<String, dynamic>),
json['playurl_info'] as Map<String, dynamic>,
),
officialType: json['official_type'] as int?,
officialRoomId: json['official_room_id'] as int?,
riskWithDelay: json['risk_with_delay'] as int?,

View File

@@ -8,10 +8,10 @@ class Format {
Format({this.formatName, this.codec, this.masterUrl});
factory Format.fromJson(Map<String, dynamic> json) => Format(
formatName: json['format_name'] as String?,
codec: (json['codec'] as List<dynamic>?)
?.map((e) => CodecItem.fromJson(e as Map<String, dynamic>))
.toList(),
masterUrl: json['master_url'] as String?,
);
formatName: json['format_name'] as String?,
codec: (json['codec'] as List<dynamic>?)
?.map((e) => CodecItem.fromJson(e as Map<String, dynamic>))
.toList(),
masterUrl: json['master_url'] as String?,
);
}

View File

@@ -16,11 +16,11 @@ class GQnDesc {
});
factory GQnDesc.fromJson(Map<String, dynamic> json) => GQnDesc(
qn: json['qn'] as int?,
desc: json['desc'] as String?,
hdrDesc: json['hdr_desc'] as String?,
attrDesc: json['attr_desc'] as dynamic,
hdrType: json['hdr_type'] as int?,
mediaBaseDesc: json['media_base_desc'] as dynamic,
);
qn: json['qn'] as int?,
desc: json['desc'] as String?,
hdrDesc: json['hdr_desc'] as String?,
attrDesc: json['attr_desc'] as dynamic,
hdrType: json['hdr_type'] as int?,
mediaBaseDesc: json['media_base_desc'] as dynamic,
);
}

View File

@@ -7,9 +7,9 @@ class P2pData {
P2pData({this.p2p, this.p2pType, this.mP2p, this.mServers});
factory P2pData.fromJson(Map<String, dynamic> json) => P2pData(
p2p: json['p2p'] as bool?,
p2pType: json['p2p_type'] as int?,
mP2p: json['m_p2p'] as bool?,
mServers: json['m_servers'] as dynamic,
);
p2p: json['p2p'] as bool?,
p2pType: json['p2p_type'] as int?,
mP2p: json['m_p2p'] as bool?,
mServers: json['m_servers'] as dynamic,
);
}

View File

@@ -18,16 +18,16 @@ class Playurl {
});
factory Playurl.fromJson(Map<String, dynamic> json) => Playurl(
cid: json['cid'] as int?,
gQnDesc: (json['g_qn_desc'] as List<dynamic>?)
?.map((e) => GQnDesc.fromJson(e as Map<String, dynamic>))
.toList(),
stream: (json['stream'] as List<dynamic>?)
?.map((e) => Stream.fromJson(e as Map<String, dynamic>))
.toList(),
p2pData: json['p2p_data'] == null
? null
: P2pData.fromJson(json['p2p_data'] as Map<String, dynamic>),
dolbyQn: json['dolby_qn'] as dynamic,
);
cid: json['cid'] as int?,
gQnDesc: (json['g_qn_desc'] as List<dynamic>?)
?.map((e) => GQnDesc.fromJson(e as Map<String, dynamic>))
.toList(),
stream: (json['stream'] as List<dynamic>?)
?.map((e) => Stream.fromJson(e as Map<String, dynamic>))
.toList(),
p2pData: json['p2p_data'] == null
? null
: P2pData.fromJson(json['p2p_data'] as Map<String, dynamic>),
dolbyQn: json['dolby_qn'] as dynamic,
);
}

View File

@@ -15,14 +15,15 @@ class PlayurlInfo {
});
factory PlayurlInfo.fromJson(Map<String, dynamic> json) => PlayurlInfo(
confJson: json['conf_json'] as String?,
playurl: json['playurl'] == null
? null
: Playurl.fromJson(json['playurl'] as Map<String, dynamic>),
expectedQuality: json['expected_quality'] == null
? null
: ExpectedQuality.fromJson(
json['expected_quality'] as Map<String, dynamic>),
qnDescMoreAb: json['qn_desc_more_ab'] as int?,
);
confJson: json['conf_json'] as String?,
playurl: json['playurl'] == null
? null
: Playurl.fromJson(json['playurl'] as Map<String, dynamic>),
expectedQuality: json['expected_quality'] == null
? null
: ExpectedQuality.fromJson(
json['expected_quality'] as Map<String, dynamic>,
),
qnDescMoreAb: json['qn_desc_more_ab'] as int?,
);
}

View File

@@ -7,9 +7,9 @@ class Stream {
Stream({this.protocolName, this.format});
factory Stream.fromJson(Map<String, dynamic> json) => Stream(
protocolName: json['protocol_name'] as String?,
format: (json['format'] as List<dynamic>?)
?.map((e) => Format.fromJson(e as Map<String, dynamic>))
.toList(),
);
protocolName: json['protocol_name'] as String?,
format: (json['format'] as List<dynamic>?)
?.map((e) => Format.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -6,8 +6,8 @@ class UrlInfo {
UrlInfo({this.host, this.extra, this.streamTtl});
factory UrlInfo.fromJson(Map<String, dynamic> json) => UrlInfo(
host: json['host'] as String?,
extra: json['extra'] as String?,
streamTtl: json['stream_ttl'] as int?,
);
host: json['host'] as String?,
extra: json['extra'] as String?,
streamTtl: json['stream_ttl'] as int?,
);
}

View File

@@ -23,17 +23,17 @@ class LiveSearchData {
});
factory LiveSearchData.fromJson(Map<String, dynamic> json) => LiveSearchData(
type: json['type'] as String?,
page: json['page'] as int?,
pagesize: json['pagesize'] as int?,
room: json['room'] == null
? null
: Room.fromJson(json['room'] as Map<String, dynamic>),
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
trackId: json['track_id'] as String?,
abtestId: json['abtest_id'] as String?,
query: json['query'] as String?,
);
type: json['type'] as String?,
page: json['page'] as int?,
pagesize: json['pagesize'] as int?,
room: json['room'] == null
? null
: Room.fromJson(json['room'] as Map<String, dynamic>),
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
trackId: json['track_id'] as String?,
abtestId: json['abtest_id'] as String?,
query: json['query'] as String?,
);
}

View File

@@ -9,11 +9,11 @@ class LiveSearch {
LiveSearch({this.code, this.message, this.ttl, this.data});
factory LiveSearch.fromJson(Map<String, dynamic> json) => LiveSearch(
code: json['code'] as int?,
message: json['message'] as String?,
ttl: json['ttl'] as int?,
data: json['data'] == null
? null
: LiveSearchData.fromJson(json['data'] as Map<String, dynamic>),
);
code: json['code'] as int?,
message: json['message'] as String?,
ttl: json['ttl'] as int?,
data: json['data'] == null
? null
: LiveSearchData.fromJson(json['data'] as Map<String, dynamic>),
);
}

View File

@@ -8,11 +8,12 @@ class Room {
Room({this.list, this.totalRoom, this.totalPage});
factory Room.fromJson(Map<String, dynamic> json) => Room(
list: (json['list'] as List<dynamic>?)
?.map((e) =>
LiveSearchRoomItemModel.fromJson(e as Map<String, dynamic>))
.toList(),
totalRoom: json['total_room'] as int?,
totalPage: json['total_page'] as int?,
);
list: (json['list'] as List<dynamic>?)
?.map(
(e) => LiveSearchRoomItemModel.fromJson(e as Map<String, dynamic>),
)
.toList(),
totalRoom: json['total_room'] as int?,
totalPage: json['total_page'] as int?,
);
}

View File

@@ -33,6 +33,7 @@ class LiveSearchRoomItemModel {
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(
json['watched_show'] as Map<String, dynamic>),
json['watched_show'] as Map<String, dynamic>,
),
);
}

View File

@@ -8,10 +8,10 @@ class User {
User({this.list, this.totalUser, this.totalPage});
factory User.fromJson(Map<String, dynamic> json) => User(
list: (json['list'] as List<dynamic>?)
?.map((e) => LiveSearchUserItemModel.fromJson(e))
.toList(),
totalUser: json['total_user'] as int?,
totalPage: json['total_page'] as int?,
);
list: (json['list'] as List<dynamic>?)
?.map((e) => LiveSearchUserItemModel.fromJson(e))
.toList(),
totalUser: json['total_user'] as int?,
totalPage: json['total_page'] as int?,
);
}

View File

@@ -13,12 +13,12 @@ class LiveSecondData {
});
factory LiveSecondData.fromJson(Map<String, dynamic> json) => LiveSecondData(
count: json['count'] as int?,
cardList: (json['list'] as List<dynamic>?)
?.map((e) => CardLiveItem.fromJson(e as Map<String, dynamic>))
.toList(),
newTags: (json['new_tags'] as List<dynamic>?)
?.map((e) => LiveSecondTag.fromJson(e as Map<String, dynamic>))
.toList(),
);
count: json['count'] as int?,
cardList: (json['list'] as List<dynamic>?)
?.map((e) => CardLiveItem.fromJson(e as Map<String, dynamic>))
.toList(),
newTags: (json['new_tags'] as List<dynamic>?)
?.map((e) => LiveSecondTag.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -10,8 +10,8 @@ class LiveSecondTag {
});
factory LiveSecondTag.fromJson(Map json) => LiveSecondTag(
id: json['id'],
name: json['name'],
sortType: json['sort_type'],
);
id: json['id'],
name: json['name'],
sortType: json['sort_type'],
);
}