mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 08:36:17 +08:00
refa: live page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
25
lib/models/live/live_feed_index/avatar.dart
Normal file
25
lib/models/live/live_feed_index/avatar.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
class Avatar {
|
||||
String? cover;
|
||||
String? event;
|
||||
String? text;
|
||||
int? uid;
|
||||
String? url;
|
||||
|
||||
Avatar({this.cover, this.event, this.text, this.uid, this.url});
|
||||
|
||||
factory Avatar.fromJson(Map<String, dynamic> json) => Avatar(
|
||||
cover: json['cover'] as String?,
|
||||
event: json['event'] as String?,
|
||||
text: json['text'] as String?,
|
||||
uid: json['uid'] as int?,
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'cover': cover,
|
||||
'event': event,
|
||||
'text': text,
|
||||
'uid': uid,
|
||||
'url': url,
|
||||
};
|
||||
}
|
||||
20
lib/models/live/live_feed_index/calendar_button.dart
Normal file
20
lib/models/live/live_feed_index/calendar_button.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
class CalendarButton {
|
||||
String? text;
|
||||
String? link;
|
||||
|
||||
CalendarButton({this.text, this.link});
|
||||
|
||||
factory CalendarButton.fromJson(Map<String, dynamic> json) {
|
||||
return CalendarButton(
|
||||
text: json['text'] as String?,
|
||||
link: json['link'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'text': text,
|
||||
'link': link,
|
||||
};
|
||||
}
|
||||
32
lib/models/live/live_feed_index/card_data.dart
Normal file
32
lib/models/live/live_feed_index/card_data.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart';
|
||||
|
||||
import 'card_data_item.dart';
|
||||
|
||||
class CardData {
|
||||
CardDataItem? bannerV2;
|
||||
CardDataItem? myIdolV1;
|
||||
CardLiveItem? smallCardV1;
|
||||
|
||||
CardData({
|
||||
this.bannerV2,
|
||||
this.myIdolV1,
|
||||
this.smallCardV1,
|
||||
});
|
||||
|
||||
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>),
|
||||
smallCardV1: json['small_card_v1'] == null
|
||||
? null
|
||||
: CardLiveItem.fromJson(
|
||||
json['small_card_v1'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'banner_v2': bannerV2?.toJson(),
|
||||
};
|
||||
}
|
||||
44
lib/models/live/live_feed_index/card_data_item.dart
Normal file
44
lib/models/live/live_feed_index/card_data_item.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart';
|
||||
|
||||
import 'module_info.dart';
|
||||
|
||||
class CardDataItem {
|
||||
ModuleInfo? moduleInfo;
|
||||
List<CardLiveItem>? list;
|
||||
dynamic topView;
|
||||
ExtraInfo? extraInfo;
|
||||
|
||||
CardDataItem({
|
||||
this.moduleInfo,
|
||||
this.list,
|
||||
this.topView,
|
||||
this.extraInfo,
|
||||
});
|
||||
|
||||
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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'module_info': moduleInfo?.toJson(),
|
||||
'list': list?.map((e) => e.toJson()).toList(),
|
||||
'top_view': topView,
|
||||
};
|
||||
}
|
||||
|
||||
class ExtraInfo {
|
||||
int? totalCount;
|
||||
|
||||
ExtraInfo.fromJson(Map<String, dynamic> json) {
|
||||
totalCount = json['total_count'];
|
||||
}
|
||||
}
|
||||
187
lib/models/live/live_feed_index/card_data_list_item.dart
Normal file
187
lib/models/live/live_feed_index/card_data_list_item.dart
Normal file
@@ -0,0 +1,187 @@
|
||||
import 'quality_description.dart';
|
||||
import 'watched_show.dart';
|
||||
|
||||
class CardLiveItem {
|
||||
int? id;
|
||||
int? roomid;
|
||||
int? uid;
|
||||
String? uname;
|
||||
String? face;
|
||||
String? cover;
|
||||
String? title;
|
||||
int? area;
|
||||
int? liveTime;
|
||||
String? areaName;
|
||||
int? areaV2Id;
|
||||
String? areaV2Name;
|
||||
String? areaV2ParentName;
|
||||
int? areaV2ParentId;
|
||||
String? liveTagName;
|
||||
int? online;
|
||||
String? playUrl;
|
||||
String? playUrlH265;
|
||||
List? acceptQuality;
|
||||
int? currentQuality;
|
||||
int? pkId;
|
||||
String? link;
|
||||
int? specialAttention;
|
||||
int? broadcastType;
|
||||
String? pendentRu;
|
||||
String? pendentRuColor;
|
||||
String? pendentRuPic;
|
||||
int? officialVerify;
|
||||
int? currentQn;
|
||||
List<QualityDescription>? qualityDescription;
|
||||
String? playUrlCard;
|
||||
int? flag;
|
||||
List<dynamic>? pendentList;
|
||||
int? p2pType;
|
||||
String? sessionId;
|
||||
int? groupId;
|
||||
WatchedShow? watchedShow;
|
||||
int? isNft;
|
||||
String? nftDmark;
|
||||
String? statusText;
|
||||
String? darkFace;
|
||||
String? trackid;
|
||||
|
||||
CardLiveItem({
|
||||
this.id,
|
||||
this.roomid,
|
||||
this.uid,
|
||||
this.uname,
|
||||
this.face,
|
||||
this.cover,
|
||||
this.title,
|
||||
this.area,
|
||||
this.liveTime,
|
||||
this.areaName,
|
||||
this.areaV2Id,
|
||||
this.areaV2Name,
|
||||
this.areaV2ParentName,
|
||||
this.areaV2ParentId,
|
||||
this.liveTagName,
|
||||
this.online,
|
||||
this.playUrl,
|
||||
this.playUrlH265,
|
||||
this.acceptQuality,
|
||||
this.currentQuality,
|
||||
this.pkId,
|
||||
this.link,
|
||||
this.specialAttention,
|
||||
this.broadcastType,
|
||||
this.pendentRu,
|
||||
this.pendentRuColor,
|
||||
this.pendentRuPic,
|
||||
this.officialVerify,
|
||||
this.currentQn,
|
||||
this.qualityDescription,
|
||||
this.playUrlCard,
|
||||
this.flag,
|
||||
this.pendentList,
|
||||
this.p2pType,
|
||||
this.sessionId,
|
||||
this.groupId,
|
||||
this.watchedShow,
|
||||
this.isNft,
|
||||
this.nftDmark,
|
||||
this.statusText,
|
||||
this.darkFace,
|
||||
this.trackid,
|
||||
});
|
||||
|
||||
factory CardLiveItem.fromJson(Map<String, dynamic> json) => CardLiveItem(
|
||||
id: json['id'] as int?,
|
||||
roomid: json['roomid'] as int?,
|
||||
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?,
|
||||
playUrl: json['play_url'] as String?,
|
||||
playUrlH265: json['play_url_h265'] as String?,
|
||||
acceptQuality: json['accept_quality'],
|
||||
currentQuality: json['current_quality'] as int?,
|
||||
pkId: json['pk_id'] as int?,
|
||||
link: json['link'] as String?,
|
||||
specialAttention: json['special_attention'] as int?,
|
||||
broadcastType: json['broadcast_type'] as int?,
|
||||
pendentRu: json['pendent_ru'] as String?,
|
||||
pendentRuColor: json['pendent_ru_color'] as String?,
|
||||
pendentRuPic: json['pendent_ru_pic'] as String?,
|
||||
officialVerify: json['official_verify'] as int?,
|
||||
currentQn: json['current_qn'] as int?,
|
||||
qualityDescription: (json['quality_description'] as List<dynamic>?)
|
||||
?.map((e) => QualityDescription.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
playUrlCard: json['play_url_card'] as String?,
|
||||
flag: json['flag'] as int?,
|
||||
pendentList: json['pendent_list'] as List<dynamic>?,
|
||||
p2pType: json['p2p_type'] as int?,
|
||||
sessionId: json['session_id'] as String?,
|
||||
groupId: json['group_id'] as int?,
|
||||
watchedShow: json['watched_show'] == null
|
||||
? null
|
||||
: WatchedShow.fromJson(
|
||||
json['watched_show'] as Map<String, dynamic>),
|
||||
isNft: json['is_nft'] as int?,
|
||||
nftDmark: json['nft_dmark'] as String?,
|
||||
statusText: json['status_text'] as String?,
|
||||
darkFace: json['dark_face'] as String?,
|
||||
trackid: json['trackid'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'roomid': roomid,
|
||||
'uid': uid,
|
||||
'uname': uname,
|
||||
'face': face,
|
||||
'cover': cover,
|
||||
'title': title,
|
||||
'area': area,
|
||||
'live_time': liveTime,
|
||||
'area_name': areaName,
|
||||
'area_v2_id': areaV2Id,
|
||||
'area_v2_name': areaV2Name,
|
||||
'area_v2_parent_name': areaV2ParentName,
|
||||
'area_v2_parent_id': areaV2ParentId,
|
||||
'live_tag_name': liveTagName,
|
||||
'online': online,
|
||||
'play_url': playUrl,
|
||||
'play_url_h265': playUrlH265,
|
||||
'accept_quality': acceptQuality,
|
||||
'current_quality': currentQuality,
|
||||
'pk_id': pkId,
|
||||
'link': link,
|
||||
'special_attention': specialAttention,
|
||||
'broadcast_type': broadcastType,
|
||||
'pendent_ru': pendentRu,
|
||||
'pendent_ru_color': pendentRuColor,
|
||||
'pendent_ru_pic': pendentRuPic,
|
||||
'official_verify': officialVerify,
|
||||
'current_qn': currentQn,
|
||||
'quality_description':
|
||||
qualityDescription?.map((e) => e.toJson()).toList(),
|
||||
'play_url_card': playUrlCard,
|
||||
'flag': flag,
|
||||
'pendent_list': pendentList,
|
||||
'p2p_type': p2pType,
|
||||
'session_id': sessionId,
|
||||
'group_id': groupId,
|
||||
'watched_show': watchedShow?.toJson(),
|
||||
'is_nft': isNft,
|
||||
'nft_dmark': nftDmark,
|
||||
'status_text': statusText,
|
||||
'dark_face': darkFace,
|
||||
'trackid': trackid,
|
||||
};
|
||||
}
|
||||
20
lib/models/live/live_feed_index/card_list.dart
Normal file
20
lib/models/live/live_feed_index/card_list.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'card_data.dart';
|
||||
|
||||
class LiveCardList {
|
||||
String? cardType;
|
||||
CardData? cardData;
|
||||
|
||||
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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'card_type': cardType,
|
||||
'card_data': cardData?.toJson(),
|
||||
};
|
||||
}
|
||||
44
lib/models/live/live_feed_index/data.dart
Normal file
44
lib/models/live/live_feed_index/data.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
import 'card_list.dart';
|
||||
|
||||
class LiveIndexData {
|
||||
List<LiveCardList>? cardList;
|
||||
int? isRollback;
|
||||
int? hasMore;
|
||||
int? triggerTime;
|
||||
int? isNeedRefresh;
|
||||
|
||||
LiveIndexData({
|
||||
this.cardList,
|
||||
this.isRollback,
|
||||
this.hasMore,
|
||||
this.triggerTime,
|
||||
this.isNeedRefresh,
|
||||
});
|
||||
|
||||
LiveIndexData.fromJson(Map<String, dynamic> json) {
|
||||
if ((json['card_list'] as List<dynamic>?)?.isNotEmpty == true) {
|
||||
cardList = <LiveCardList>[];
|
||||
// banner_v2
|
||||
// my_idol_v1
|
||||
// area_entrance_v3
|
||||
// small_card_v1
|
||||
for (var json in json['card_list']) {
|
||||
if (const ['my_idol_v1', 'small_card_v1'].contains(json['card_type'])) {
|
||||
cardList!.add(LiveCardList.fromJson(json));
|
||||
}
|
||||
}
|
||||
}
|
||||
isRollback = json['is_rollback'] as int?;
|
||||
hasMore = json['has_more'] as int?;
|
||||
triggerTime = json['trigger_time'] as int?;
|
||||
isNeedRefresh = json['is_need_refresh'] as int?;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'card_list': cardList?.map((e) => e.toJson()).toList(),
|
||||
'is_rollback': isRollback,
|
||||
'has_more': hasMore,
|
||||
'trigger_time': triggerTime,
|
||||
'is_need_refresh': isNeedRefresh,
|
||||
};
|
||||
}
|
||||
43
lib/models/live/live_feed_index/in_live.dart
Normal file
43
lib/models/live/live_feed_index/in_live.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
class InLive {
|
||||
int? alphaLight;
|
||||
int? alphaNight;
|
||||
String? animationUrl;
|
||||
String? animationUrlHash;
|
||||
String? backgroundColorLight;
|
||||
String? backgroundColorNight;
|
||||
String? fontColor;
|
||||
String? text;
|
||||
|
||||
InLive({
|
||||
this.alphaLight,
|
||||
this.alphaNight,
|
||||
this.animationUrl,
|
||||
this.animationUrlHash,
|
||||
this.backgroundColorLight,
|
||||
this.backgroundColorNight,
|
||||
this.fontColor,
|
||||
this.text,
|
||||
});
|
||||
|
||||
factory InLive.fromJson(Map<String, dynamic> json) => InLive(
|
||||
alphaLight: json['alpha_light'] as int?,
|
||||
alphaNight: json['alpha_night'] as int?,
|
||||
animationUrl: json['animation_url'] as String?,
|
||||
animationUrlHash: json['animation_url_hash'] as String?,
|
||||
backgroundColorLight: json['background_color_light'] as String?,
|
||||
backgroundColorNight: json['background_color_night'] as String?,
|
||||
fontColor: json['font_color'] as String?,
|
||||
text: json['text'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'alpha_light': alphaLight,
|
||||
'alpha_night': alphaNight,
|
||||
'animation_url': animationUrl,
|
||||
'animation_url_hash': animationUrlHash,
|
||||
'background_color_light': backgroundColorLight,
|
||||
'background_color_night': backgroundColorNight,
|
||||
'font_color': fontColor,
|
||||
'text': text,
|
||||
};
|
||||
}
|
||||
76
lib/models/live/live_feed_index/inline_live.dart
Normal file
76
lib/models/live/live_feed_index/inline_live.dart
Normal file
@@ -0,0 +1,76 @@
|
||||
import 'avatar.dart';
|
||||
import 'calendar_button.dart';
|
||||
import 'player_args.dart';
|
||||
import 'right_top_live_badge.dart';
|
||||
|
||||
class InlineLive {
|
||||
Avatar? avatar;
|
||||
String? cover;
|
||||
int? inlineStartDelayTime;
|
||||
int? inlineSustainDuration;
|
||||
String? link;
|
||||
PlayerArgs? playerArgs;
|
||||
dynamic rankListInfo;
|
||||
RightTopLiveBadge? rightTopLiveBadge;
|
||||
String? title;
|
||||
dynamic topViewInfo;
|
||||
String? upName;
|
||||
String? inlinePlayUrl;
|
||||
CalendarButton? calendarButton;
|
||||
|
||||
InlineLive({
|
||||
this.avatar,
|
||||
this.cover,
|
||||
this.inlineStartDelayTime,
|
||||
this.inlineSustainDuration,
|
||||
this.link,
|
||||
this.playerArgs,
|
||||
this.rankListInfo,
|
||||
this.rightTopLiveBadge,
|
||||
this.title,
|
||||
this.topViewInfo,
|
||||
this.upName,
|
||||
this.inlinePlayUrl,
|
||||
this.calendarButton,
|
||||
});
|
||||
|
||||
factory InlineLive.fromJson(Map<String, dynamic> json) => InlineLive(
|
||||
avatar: json['avatar'] == null
|
||||
? null
|
||||
: Avatar.fromJson(json['avatar'] as Map<String, dynamic>),
|
||||
cover: json['cover'] as String?,
|
||||
inlineStartDelayTime: json['inline_start_delay_time'] as int?,
|
||||
inlineSustainDuration: json['inline_sustain_duration'] as int?,
|
||||
link: json['link'] as String?,
|
||||
playerArgs: json['player_args'] == null
|
||||
? null
|
||||
: PlayerArgs.fromJson(json['player_args'] as Map<String, dynamic>),
|
||||
rankListInfo: json['rank_list_info'] as dynamic,
|
||||
rightTopLiveBadge: json['right_top_live_badge'] == null
|
||||
? null
|
||||
: RightTopLiveBadge.fromJson(json['right_top_live_badge'] as Map<String, dynamic>),
|
||||
title: json['title'] as String?,
|
||||
topViewInfo: json['top_view_info'] as dynamic,
|
||||
upName: json['up_name'] as String?,
|
||||
inlinePlayUrl: json['inline_play_url'] as String?,
|
||||
calendarButton: json['calendar_button'] == null
|
||||
? null
|
||||
: CalendarButton.fromJson(json['calendar_button'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'avatar': avatar?.toJson(),
|
||||
'cover': cover,
|
||||
'inline_start_delay_time': inlineStartDelayTime,
|
||||
'inline_sustain_duration': inlineSustainDuration,
|
||||
'link': link,
|
||||
'player_args': playerArgs?.toJson(),
|
||||
'rank_list_info': rankListInfo,
|
||||
'right_top_live_badge': rightTopLiveBadge?.toJson(),
|
||||
'title': title,
|
||||
'top_view_info': topViewInfo,
|
||||
'up_name': upName,
|
||||
'inline_play_url': inlinePlayUrl,
|
||||
'calendar_button': calendarButton?.toJson(),
|
||||
};
|
||||
}
|
||||
26
lib/models/live/live_feed_index/live_feed_index.dart
Normal file
26
lib/models/live/live_feed_index/live_feed_index.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'data.dart';
|
||||
|
||||
class LiveFeedIndex {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
LiveIndexData? data;
|
||||
|
||||
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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'code': code,
|
||||
'message': message,
|
||||
'ttl': ttl,
|
||||
'data': data?.toJson(),
|
||||
};
|
||||
}
|
||||
39
lib/models/live/live_feed_index/module_info.dart
Normal file
39
lib/models/live/live_feed_index/module_info.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
class ModuleInfo {
|
||||
int? id;
|
||||
String? link;
|
||||
String? pic;
|
||||
String? title;
|
||||
int? type;
|
||||
int? sort;
|
||||
int? count;
|
||||
|
||||
ModuleInfo({
|
||||
this.id,
|
||||
this.link,
|
||||
this.pic,
|
||||
this.title,
|
||||
this.type,
|
||||
this.sort,
|
||||
this.count,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'link': link,
|
||||
'pic': pic,
|
||||
'title': title,
|
||||
'type': type,
|
||||
'sort': sort,
|
||||
'count': count,
|
||||
};
|
||||
}
|
||||
39
lib/models/live/live_feed_index/player_args.dart
Normal file
39
lib/models/live/live_feed_index/player_args.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
class PlayerArgs {
|
||||
int? canPlay;
|
||||
bool? hideDanmuSwitch;
|
||||
int? liveStatus;
|
||||
int? parentAreaId;
|
||||
int? areaId;
|
||||
int? roomId;
|
||||
int? upId;
|
||||
|
||||
PlayerArgs({
|
||||
this.canPlay,
|
||||
this.hideDanmuSwitch,
|
||||
this.liveStatus,
|
||||
this.parentAreaId,
|
||||
this.areaId,
|
||||
this.roomId,
|
||||
this.upId,
|
||||
});
|
||||
|
||||
factory PlayerArgs.fromJson(Map<String, dynamic> json) => PlayerArgs(
|
||||
canPlay: json['can_play'] as int?,
|
||||
hideDanmuSwitch: json['hide_danmu_switch'] as bool?,
|
||||
liveStatus: json['live_status'] as int?,
|
||||
parentAreaId: json['parent_area_id'] as int?,
|
||||
areaId: json['area_id'] as int?,
|
||||
roomId: json['room_id'] as int?,
|
||||
upId: json['up_id'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'can_play': canPlay,
|
||||
'hide_danmu_switch': hideDanmuSwitch,
|
||||
'live_status': liveStatus,
|
||||
'parent_area_id': parentAreaId,
|
||||
'area_id': areaId,
|
||||
'room_id': roomId,
|
||||
'up_id': upId,
|
||||
};
|
||||
}
|
||||
20
lib/models/live/live_feed_index/quality_description.dart
Normal file
20
lib/models/live/live_feed_index/quality_description.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
class QualityDescription {
|
||||
int? qn;
|
||||
String? desc;
|
||||
|
||||
QualityDescription({this.qn, this.desc});
|
||||
|
||||
factory QualityDescription.fromJson(Map<String, dynamic> json) {
|
||||
return QualityDescription(
|
||||
qn: json['qn'] as int?,
|
||||
desc: json['desc'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'qn': qn,
|
||||
'desc': desc,
|
||||
};
|
||||
}
|
||||
24
lib/models/live/live_feed_index/right_top_live_badge.dart
Normal file
24
lib/models/live/live_feed_index/right_top_live_badge.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'in_live.dart';
|
||||
|
||||
class RightTopLiveBadge {
|
||||
InLive? inLive;
|
||||
int? liveStatus;
|
||||
|
||||
RightTopLiveBadge({this.inLive, this.liveStatus});
|
||||
|
||||
factory RightTopLiveBadge.fromJson(Map<String, dynamic> json) {
|
||||
return RightTopLiveBadge(
|
||||
inLive: json['in_live'] == null
|
||||
? null
|
||||
: InLive.fromJson(json['in_live'] as Map<String, dynamic>),
|
||||
liveStatus: json['live_status'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'in_live': inLive?.toJson(),
|
||||
'live_status': liveStatus,
|
||||
};
|
||||
}
|
||||
39
lib/models/live/live_feed_index/watched_show.dart
Normal file
39
lib/models/live/live_feed_index/watched_show.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
class WatchedShow {
|
||||
bool? sw1tch;
|
||||
int? num;
|
||||
String? textSmall;
|
||||
String? textLarge;
|
||||
String? icon;
|
||||
int? iconLocation;
|
||||
String? iconWeb;
|
||||
|
||||
WatchedShow({
|
||||
this.sw1tch,
|
||||
this.num,
|
||||
this.textSmall,
|
||||
this.textLarge,
|
||||
this.icon,
|
||||
this.iconLocation,
|
||||
this.iconWeb,
|
||||
});
|
||||
|
||||
factory WatchedShow.fromJson(Map<String, dynamic> json) => WatchedShow(
|
||||
sw1tch: json['switch'] as bool?,
|
||||
num: json['num'] as int?,
|
||||
textSmall: json['text_small'] as String?,
|
||||
textLarge: json['text_large'] as String?,
|
||||
icon: json['icon'] as String?,
|
||||
iconLocation: json['icon_location'] as int?,
|
||||
iconWeb: json['icon_web'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'switch': sw1tch,
|
||||
'num': num,
|
||||
'text_small': textSmall,
|
||||
'text_large': textLarge,
|
||||
'icon': icon,
|
||||
'icon_location': iconLocation,
|
||||
'icon_web': iconWeb,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user