mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 20:16:26 +08:00
48
lib/models_new/live/live_area_list/area_item.dart
Normal file
48
lib/models_new/live/live_area_list/area_item.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
class AreaItem {
|
||||
dynamic id;
|
||||
String? name;
|
||||
String? link;
|
||||
String? pic;
|
||||
dynamic parentId;
|
||||
String? parentName;
|
||||
int? areaType;
|
||||
int? tagType;
|
||||
|
||||
bool? isFav;
|
||||
|
||||
AreaItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.link,
|
||||
this.pic,
|
||||
this.parentId,
|
||||
this.parentName,
|
||||
this.areaType,
|
||||
this.tagType,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (other is AreaItem) {
|
||||
return id == other.id && parentId == other.parentId;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(id, parentId);
|
||||
}
|
||||
19
lib/models_new/live/live_area_list/area_list.dart
Normal file
19
lib/models_new/live/live_area_list/area_list.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart';
|
||||
|
||||
class AreaList {
|
||||
int? id;
|
||||
String? name;
|
||||
int? parentAreaType;
|
||||
List<AreaItem>? 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(),
|
||||
);
|
||||
}
|
||||
33
lib/models_new/live/live_dm_info/data.dart
Normal file
33
lib/models_new/live/live_dm_info/data.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:PiliPlus/models_new/live/live_dm_info/host_list.dart';
|
||||
|
||||
class LiveDmInfoData {
|
||||
String? group;
|
||||
int? businessId;
|
||||
double? refreshRowFactor;
|
||||
int? refreshRate;
|
||||
int? maxDelay;
|
||||
String? token;
|
||||
List<HostList>? hostList;
|
||||
|
||||
LiveDmInfoData({
|
||||
this.group,
|
||||
this.businessId,
|
||||
this.refreshRowFactor,
|
||||
this.refreshRate,
|
||||
this.maxDelay,
|
||||
this.token,
|
||||
this.hostList,
|
||||
});
|
||||
|
||||
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(),
|
||||
);
|
||||
}
|
||||
15
lib/models_new/live/live_dm_info/host_list.dart
Normal file
15
lib/models_new/live/live_dm_info/host_list.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class HostList {
|
||||
String? host;
|
||||
int? port;
|
||||
int? wssPort;
|
||||
int? wsPort;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_emote/data.dart
Normal file
13
lib/models_new/live/live_emote/data.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/live/live_emote/datum.dart';
|
||||
|
||||
class LiveEmoteData {
|
||||
List<LiveEmoteDatum>? data;
|
||||
|
||||
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(),
|
||||
);
|
||||
}
|
||||
21
lib/models_new/live/live_emote/datum.dart
Normal file
21
lib/models_new/live/live_emote/datum.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'package:PiliPlus/models_new/live/live_emote/emoticon.dart';
|
||||
|
||||
class LiveEmoteDatum {
|
||||
List<Emoticon>? emoticons;
|
||||
int? pkgType;
|
||||
String? currentCover;
|
||||
|
||||
LiveEmoteDatum({
|
||||
this.emoticons,
|
||||
this.pkgType,
|
||||
this.currentCover,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
23
lib/models_new/live/live_emote/emoticon.dart
Normal file
23
lib/models_new/live/live_emote/emoticon.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class Emoticon {
|
||||
String? emoji;
|
||||
String? url;
|
||||
int? width;
|
||||
int? height;
|
||||
String? emoticonUnique;
|
||||
|
||||
Emoticon({
|
||||
this.emoji,
|
||||
this.url,
|
||||
this.width,
|
||||
this.height,
|
||||
this.emoticonUnique,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
33
lib/models_new/live/live_feed_index/card_data.dart
Normal file
33
lib/models_new/live/live_feed_index/card_data.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_item.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_list_item.dart';
|
||||
|
||||
class CardData {
|
||||
CardDataItem? bannerV2;
|
||||
CardDataItem? myIdolV1;
|
||||
CardDataItem? areaEntranceV3;
|
||||
CardLiveItem? smallCardV1;
|
||||
|
||||
CardData({
|
||||
this.bannerV2,
|
||||
this.myIdolV1,
|
||||
this.areaEntranceV3,
|
||||
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>),
|
||||
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>),
|
||||
);
|
||||
}
|
||||
37
lib/models_new/live/live_feed_index/card_data_item.dart
Normal file
37
lib/models_new/live/live_feed_index/card_data_item.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_list_item.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/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>),
|
||||
);
|
||||
}
|
||||
|
||||
class ExtraInfo {
|
||||
int? totalCount;
|
||||
|
||||
ExtraInfo.fromJson(Map<String, dynamic> json) {
|
||||
totalCount = json['total_count'];
|
||||
}
|
||||
}
|
||||
76
lib/models_new/live/live_feed_index/card_data_list_item.dart
Normal file
76
lib/models_new/live/live_feed_index/card_data_list_item.dart
Normal file
@@ -0,0 +1,76 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
|
||||
|
||||
class CardLiveItem {
|
||||
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? link;
|
||||
int? officialVerify;
|
||||
int? currentQn;
|
||||
WatchedShow? watchedShow;
|
||||
String? statusText;
|
||||
int? tagType;
|
||||
|
||||
CardLiveItem({
|
||||
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.link,
|
||||
this.officialVerify,
|
||||
this.currentQn,
|
||||
this.watchedShow,
|
||||
this.statusText,
|
||||
this.tagType,
|
||||
});
|
||||
|
||||
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'],
|
||||
);
|
||||
}
|
||||
15
lib/models_new/live/live_feed_index/card_list.dart
Normal file
15
lib/models_new/live/live_feed_index/card_list.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/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>),
|
||||
);
|
||||
}
|
||||
46
lib/models_new/live/live_feed_index/data.dart
Normal file
46
lib/models_new/live/live_feed_index/data.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_list.dart';
|
||||
|
||||
class LiveIndexData {
|
||||
List<LiveCardList>? cardList;
|
||||
int? isRollback;
|
||||
int? hasMore;
|
||||
int? triggerTime;
|
||||
int? isNeedRefresh;
|
||||
LiveCardList? followItem;
|
||||
LiveCardList? areaItem;
|
||||
|
||||
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) {
|
||||
// banner_v2
|
||||
// my_idol_v1
|
||||
// area_entrance_v3
|
||||
// small_card_v1
|
||||
for (var json in json['card_list']) {
|
||||
switch (json['card_type']) {
|
||||
case 'my_idol_v1':
|
||||
followItem = LiveCardList.fromJson(json);
|
||||
break;
|
||||
case 'area_entrance_v3':
|
||||
areaItem = LiveCardList.fromJson(json);
|
||||
break;
|
||||
case 'small_card_v1':
|
||||
cardList ??= <LiveCardList>[];
|
||||
cardList!.add(LiveCardList.fromJson(json));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
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?;
|
||||
}
|
||||
}
|
||||
19
lib/models_new/live/live_feed_index/live_feed_index.dart
Normal file
19
lib/models_new/live/live_feed_index/live_feed_index.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/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>),
|
||||
);
|
||||
}
|
||||
29
lib/models_new/live/live_feed_index/module_info.dart
Normal file
29
lib/models_new/live/live_feed_index/module_info.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
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?,
|
||||
);
|
||||
}
|
||||
14
lib/models_new/live/live_feed_index/watched_show.dart
Normal file
14
lib/models_new/live/live_feed_index/watched_show.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
class WatchedShow {
|
||||
String? textSmall;
|
||||
String? textLarge;
|
||||
|
||||
WatchedShow({
|
||||
this.textSmall,
|
||||
this.textLarge,
|
||||
});
|
||||
|
||||
factory WatchedShow.fromJson(Map<String, dynamic> json) => WatchedShow(
|
||||
textSmall: json['text_small'] as String?,
|
||||
textLarge: json['text_large'] as String?,
|
||||
);
|
||||
}
|
||||
41
lib/models_new/live/live_follow/data.dart
Normal file
41
lib/models_new/live/live_follow/data.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:PiliPlus/models_new/live/live_follow/item.dart';
|
||||
|
||||
class LiveFollowData {
|
||||
String? title;
|
||||
int? pageSize;
|
||||
int? totalPage;
|
||||
List<LiveFollowItem>? list;
|
||||
int? count;
|
||||
int? neverLivedCount;
|
||||
int? liveCount;
|
||||
List<dynamic>? neverLivedFaces;
|
||||
|
||||
LiveFollowData({
|
||||
this.title,
|
||||
this.pageSize,
|
||||
this.totalPage,
|
||||
this.list,
|
||||
this.count,
|
||||
this.neverLivedCount,
|
||||
this.liveCount,
|
||||
this.neverLivedFaces,
|
||||
});
|
||||
|
||||
LiveFollowData.fromJson(Map<String, dynamic> json) {
|
||||
title = json['title'] as String?;
|
||||
pageSize = json['pageSize'] as int?;
|
||||
totalPage = json['totalPage'] as int?;
|
||||
if ((json['list'] as List<dynamic>?)?.isNotEmpty == true) {
|
||||
list = <LiveFollowItem>[];
|
||||
for (var json in json['list']) {
|
||||
if (json['live_status'] == 1) {
|
||||
list!.add(LiveFollowItem.fromJson(json));
|
||||
}
|
||||
}
|
||||
}
|
||||
count = json['count'] as int?;
|
||||
neverLivedCount = json['never_lived_count'] as int?;
|
||||
liveCount = json['live_count'] as int?;
|
||||
neverLivedFaces = json['never_lived_faces'] as List<dynamic>?;
|
||||
}
|
||||
}
|
||||
83
lib/models_new/live/live_follow/item.dart
Normal file
83
lib/models_new/live/live_follow/item.dart
Normal file
@@ -0,0 +1,83 @@
|
||||
class LiveFollowItem {
|
||||
int? roomid;
|
||||
int? uid;
|
||||
String? uname;
|
||||
String? title;
|
||||
String? face;
|
||||
int? liveStatus;
|
||||
int? recordNum;
|
||||
String? recentRecordId;
|
||||
int? isAttention;
|
||||
int? clipnum;
|
||||
int? fansNum;
|
||||
String? areaName;
|
||||
String? areaValue;
|
||||
String? tags;
|
||||
String? recentRecordIdV2;
|
||||
int? recordNumV2;
|
||||
int? recordLiveTime;
|
||||
String? areaNameV2;
|
||||
String? roomNews;
|
||||
bool? sw1tch;
|
||||
String? watchIcon;
|
||||
String? textSmall;
|
||||
String? roomCover;
|
||||
int? parentAreaId;
|
||||
int? areaId;
|
||||
|
||||
LiveFollowItem({
|
||||
this.roomid,
|
||||
this.uid,
|
||||
this.uname,
|
||||
this.title,
|
||||
this.face,
|
||||
this.liveStatus,
|
||||
this.recordNum,
|
||||
this.recentRecordId,
|
||||
this.isAttention,
|
||||
this.clipnum,
|
||||
this.fansNum,
|
||||
this.areaName,
|
||||
this.areaValue,
|
||||
this.tags,
|
||||
this.recentRecordIdV2,
|
||||
this.recordNumV2,
|
||||
this.recordLiveTime,
|
||||
this.areaNameV2,
|
||||
this.roomNews,
|
||||
this.sw1tch,
|
||||
this.watchIcon,
|
||||
this.textSmall,
|
||||
this.roomCover,
|
||||
this.parentAreaId,
|
||||
this.areaId,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
19
lib/models_new/live/live_room_info_h5/anchor_info.dart
Normal file
19
lib/models_new/live/live_room_info_h5/anchor_info.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/base_info.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/relation_info.dart';
|
||||
|
||||
class AnchorInfo {
|
||||
BaseInfo? baseInfo;
|
||||
RelationInfo? relationInfo;
|
||||
|
||||
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>),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_room_info_h5/area_mask_info.dart
Normal file
13
lib/models_new/live/live_room_info_h5/area_mask_info.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/area_masks.dart';
|
||||
|
||||
class AreaMaskInfo {
|
||||
AreaMasks? areaMasks;
|
||||
|
||||
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>),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_room_info_h5/area_masks.dart
Normal file
13
lib/models_new/live/live_room_info_h5/area_masks.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class AreaMasks {
|
||||
dynamic horizontalMasks;
|
||||
dynamic verticalMasks;
|
||||
dynamic fullMask;
|
||||
|
||||
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,
|
||||
);
|
||||
}
|
||||
18
lib/models_new/live/live_room_info_h5/base_info.dart
Normal file
18
lib/models_new/live/live_room_info_h5/base_info.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/official_info.dart';
|
||||
|
||||
class BaseInfo {
|
||||
String? uname;
|
||||
String? face;
|
||||
OfficialInfo? officialInfo;
|
||||
|
||||
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>),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_room_info_h5/block_info.dart
Normal file
13
lib/models_new/live/live_room_info_h5/block_info.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class BlockInfo {
|
||||
bool? block;
|
||||
String? desc;
|
||||
int? business;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
70
lib/models_new/live/live_room_info_h5/data.dart
Normal file
70
lib/models_new/live/live_room_info_h5/data.dart
Normal file
@@ -0,0 +1,70 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
|
||||
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/anchor_info.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/area_mask_info.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/block_info.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/like_info_v3.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/new_switch_info.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/news_info.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/room_info.dart';
|
||||
|
||||
class RoomInfoH5Data {
|
||||
RoomInfo? roomInfo;
|
||||
AnchorInfo? anchorInfo;
|
||||
NewSwitchInfo? newSwitchInfo;
|
||||
List<dynamic>? bannerInfo;
|
||||
int? isRoomFeed;
|
||||
List<dynamic>? tabInfo;
|
||||
NewsInfo? newsInfo;
|
||||
WatchedShow? watchedShow;
|
||||
LikeInfoV3? likeInfoV3;
|
||||
BlockInfo? blockInfo;
|
||||
AreaMaskInfo? areaMaskInfo;
|
||||
|
||||
RoomInfoH5Data({
|
||||
this.roomInfo,
|
||||
this.anchorInfo,
|
||||
this.newSwitchInfo,
|
||||
this.bannerInfo,
|
||||
this.isRoomFeed,
|
||||
this.tabInfo,
|
||||
this.newsInfo,
|
||||
this.watchedShow,
|
||||
this.likeInfoV3,
|
||||
this.blockInfo,
|
||||
this.areaMaskInfo,
|
||||
});
|
||||
|
||||
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>),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_room_info_h5/frame.dart
Normal file
13
lib/models_new/live/live_room_info_h5/frame.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Frame {
|
||||
String? name;
|
||||
String? value;
|
||||
String? desc;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
68
lib/models_new/live/live_room_info_h5/like_info_v3.dart
Normal file
68
lib/models_new/live/live_room_info_h5/like_info_v3.dart
Normal file
@@ -0,0 +1,68 @@
|
||||
class LikeInfoV3 {
|
||||
int? totalLikes;
|
||||
bool? clickBlock;
|
||||
bool? countBlock;
|
||||
String? guildEmoText;
|
||||
String? guildDmText;
|
||||
String? likeDmText;
|
||||
List<String>? handIcons;
|
||||
List<String>? dmIcons;
|
||||
String? eggshellsIcon;
|
||||
int? countShowTime;
|
||||
String? processIcon;
|
||||
String? processColor;
|
||||
int? reportClickLimit;
|
||||
int? reportTimeMin;
|
||||
int? reportTimeMax;
|
||||
String? icon;
|
||||
double? cooldown;
|
||||
bool? handUseFace;
|
||||
List<String>? guideIconUrls;
|
||||
double? guideIconRatio;
|
||||
|
||||
LikeInfoV3({
|
||||
this.totalLikes,
|
||||
this.clickBlock,
|
||||
this.countBlock,
|
||||
this.guildEmoText,
|
||||
this.guildDmText,
|
||||
this.likeDmText,
|
||||
this.handIcons,
|
||||
this.dmIcons,
|
||||
this.eggshellsIcon,
|
||||
this.countShowTime,
|
||||
this.processIcon,
|
||||
this.processColor,
|
||||
this.reportClickLimit,
|
||||
this.reportTimeMin,
|
||||
this.reportTimeMax,
|
||||
this.icon,
|
||||
this.cooldown,
|
||||
this.handUseFace,
|
||||
this.guideIconUrls,
|
||||
this.guideIconRatio,
|
||||
});
|
||||
|
||||
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(),
|
||||
);
|
||||
}
|
||||
26
lib/models_new/live/live_room_info_h5/new_switch_info.dart
Normal file
26
lib/models_new/live/live_room_info_h5/new_switch_info.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class NewSwitchInfo {
|
||||
int? roomInfoPopularity;
|
||||
int? roomTab;
|
||||
int? roomPlayerWatermark;
|
||||
int? roomRecommendLiveOff;
|
||||
int? brandUserCardSwitch;
|
||||
int? brandFollowSwitch;
|
||||
|
||||
NewSwitchInfo({
|
||||
this.roomInfoPopularity,
|
||||
this.roomTab,
|
||||
this.roomPlayerWatermark,
|
||||
this.roomRecommendLiveOff,
|
||||
this.brandUserCardSwitch,
|
||||
this.brandFollowSwitch,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_room_info_h5/news_info.dart
Normal file
13
lib/models_new/live/live_room_info_h5/news_info.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class NewsInfo {
|
||||
int? uid;
|
||||
String? ctime;
|
||||
String? content;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
23
lib/models_new/live/live_room_info_h5/official_info.dart
Normal file
23
lib/models_new/live/live_room_info_h5/official_info.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class OfficialInfo {
|
||||
int? role;
|
||||
String? title;
|
||||
String? desc;
|
||||
int? isNft;
|
||||
String? nftDmark;
|
||||
|
||||
OfficialInfo({
|
||||
this.role,
|
||||
this.title,
|
||||
this.desc,
|
||||
this.isNft,
|
||||
this.nftDmark,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_room_info_h5/pendants.dart
Normal file
13
lib/models_new/live/live_room_info_h5/pendants.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/frame.dart';
|
||||
|
||||
class Pendants {
|
||||
Frame? frame;
|
||||
|
||||
Pendants({this.frame});
|
||||
|
||||
factory Pendants.fromJson(Map<String, dynamic> json) => Pendants(
|
||||
frame: json['frame'] == null
|
||||
? null
|
||||
: Frame.fromJson(json['frame'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
9
lib/models_new/live/live_room_info_h5/relation_info.dart
Normal file
9
lib/models_new/live/live_room_info_h5/relation_info.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class RelationInfo {
|
||||
int? attention;
|
||||
|
||||
RelationInfo({this.attention});
|
||||
|
||||
factory RelationInfo.fromJson(Map<String, dynamic> json) => RelationInfo(
|
||||
attention: json['attention'] as int?,
|
||||
);
|
||||
}
|
||||
66
lib/models_new/live/live_room_info_h5/room_info.dart
Normal file
66
lib/models_new/live/live_room_info_h5/room_info.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_info_h5/pendants.dart';
|
||||
|
||||
class RoomInfo {
|
||||
int? uid;
|
||||
int? roomId;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? description;
|
||||
int? liveStatus;
|
||||
int? liveStartTime;
|
||||
int? areaId;
|
||||
String? areaName;
|
||||
int? parentAreaId;
|
||||
String? parentAreaName;
|
||||
int? online;
|
||||
String? keyframe;
|
||||
String? background;
|
||||
String? appBackground;
|
||||
Pendants? pendants;
|
||||
String? subSessionKey;
|
||||
String? liveId;
|
||||
|
||||
RoomInfo({
|
||||
this.uid,
|
||||
this.roomId,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.description,
|
||||
this.liveStatus,
|
||||
this.liveStartTime,
|
||||
this.areaId,
|
||||
this.areaName,
|
||||
this.parentAreaId,
|
||||
this.parentAreaName,
|
||||
this.online,
|
||||
this.keyframe,
|
||||
this.background,
|
||||
this.appBackground,
|
||||
this.pendants,
|
||||
this.subSessionKey,
|
||||
this.liveId,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
39
lib/models_new/live/live_room_play_info/codec.dart
Normal file
39
lib/models_new/live/live_room_play_info/codec.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/url_info.dart';
|
||||
|
||||
class CodecItem {
|
||||
String? codecName;
|
||||
int? currentQn;
|
||||
List<int>? acceptQn;
|
||||
String? baseUrl;
|
||||
List<UrlInfo>? urlInfo;
|
||||
dynamic hdrQn;
|
||||
int? dolbyType;
|
||||
String? attrName;
|
||||
int? hdrType;
|
||||
|
||||
CodecItem({
|
||||
this.codecName,
|
||||
this.currentQn,
|
||||
this.acceptQn,
|
||||
this.baseUrl,
|
||||
this.urlInfo,
|
||||
this.hdrQn,
|
||||
this.dolbyType,
|
||||
this.attrName,
|
||||
this.hdrType,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
77
lib/models_new/live/live_room_play_info/data.dart
Normal file
77
lib/models_new/live/live_room_play_info/data.dart
Normal file
@@ -0,0 +1,77 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/playurl_info.dart';
|
||||
|
||||
class RoomPlayInfoData {
|
||||
int? roomId;
|
||||
int? shortId;
|
||||
int? uid;
|
||||
bool? isHidden;
|
||||
bool? isLocked;
|
||||
bool? isPortrait;
|
||||
int? liveStatus;
|
||||
int? hiddenTill;
|
||||
int? lockTill;
|
||||
bool? encrypted;
|
||||
bool? pwdVerified;
|
||||
int? liveTime;
|
||||
int? roomShield;
|
||||
List<dynamic>? allSpecialTypes;
|
||||
PlayurlInfo? playurlInfo;
|
||||
int? officialType;
|
||||
int? officialRoomId;
|
||||
int? riskWithDelay;
|
||||
String? multiScreenInfo;
|
||||
dynamic pureControlFunction;
|
||||
dynamic degradedPlayurl;
|
||||
|
||||
RoomPlayInfoData({
|
||||
this.roomId,
|
||||
this.shortId,
|
||||
this.uid,
|
||||
this.isHidden,
|
||||
this.isLocked,
|
||||
this.isPortrait,
|
||||
this.liveStatus,
|
||||
this.hiddenTill,
|
||||
this.lockTill,
|
||||
this.encrypted,
|
||||
this.pwdVerified,
|
||||
this.liveTime,
|
||||
this.roomShield,
|
||||
this.allSpecialTypes,
|
||||
this.playurlInfo,
|
||||
this.officialType,
|
||||
this.officialRoomId,
|
||||
this.riskWithDelay,
|
||||
this.multiScreenInfo,
|
||||
this.pureControlFunction,
|
||||
this.degradedPlayurl,
|
||||
});
|
||||
|
||||
factory RoomPlayInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
RoomPlayInfoData(
|
||||
roomId: json['room_id'] as int?,
|
||||
shortId: json['short_id'] as int?,
|
||||
uid: json['uid'] as int?,
|
||||
isHidden: json['is_hidden'] as bool?,
|
||||
isLocked: json['is_locked'] as bool?,
|
||||
isPortrait: json['is_portrait'] as bool?,
|
||||
liveStatus: json['live_status'] as int?,
|
||||
hiddenTill: json['hidden_till'] as int?,
|
||||
lockTill: json['lock_till'] as int?,
|
||||
encrypted: json['encrypted'] as bool?,
|
||||
pwdVerified: json['pwd_verified'] as bool?,
|
||||
liveTime: json['live_time'] as int?,
|
||||
roomShield: json['room_shield'] as int?,
|
||||
allSpecialTypes: json['all_special_types'] as List<dynamic>?,
|
||||
playurlInfo: json['playurl_info'] == null
|
||||
? null
|
||||
: PlayurlInfo.fromJson(
|
||||
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?,
|
||||
multiScreenInfo: json['multi_screen_info'] as String?,
|
||||
pureControlFunction: json['pure_control_function'] as dynamic,
|
||||
degradedPlayurl: json['degraded_playurl'] as dynamic,
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class ExpectedQuality {
|
||||
int? qn;
|
||||
int? hdrType;
|
||||
|
||||
ExpectedQuality({this.qn, this.hdrType});
|
||||
|
||||
factory ExpectedQuality.fromJson(Map<String, dynamic> json) {
|
||||
return ExpectedQuality(
|
||||
qn: json['qn'] as int?,
|
||||
hdrType: json['hdr_type'] as int?,
|
||||
);
|
||||
}
|
||||
}
|
||||
17
lib/models_new/live/live_room_play_info/format.dart
Normal file
17
lib/models_new/live/live_room_play_info/format.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/codec.dart';
|
||||
|
||||
class Format {
|
||||
String? formatName;
|
||||
List<CodecItem>? codec;
|
||||
String? masterUrl;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/live/live_room_play_info/g_qn_desc.dart
Normal file
26
lib/models_new/live/live_room_play_info/g_qn_desc.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class GQnDesc {
|
||||
int? qn;
|
||||
String? desc;
|
||||
String? hdrDesc;
|
||||
dynamic attrDesc;
|
||||
int? hdrType;
|
||||
dynamic mediaBaseDesc;
|
||||
|
||||
GQnDesc({
|
||||
this.qn,
|
||||
this.desc,
|
||||
this.hdrDesc,
|
||||
this.attrDesc,
|
||||
this.hdrType,
|
||||
this.mediaBaseDesc,
|
||||
});
|
||||
|
||||
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,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/live/live_room_play_info/p2p_data.dart
Normal file
15
lib/models_new/live/live_room_play_info/p2p_data.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class P2pData {
|
||||
bool? p2p;
|
||||
int? p2pType;
|
||||
bool? mP2p;
|
||||
dynamic mServers;
|
||||
|
||||
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,
|
||||
);
|
||||
}
|
||||
33
lib/models_new/live/live_room_play_info/playurl.dart
Normal file
33
lib/models_new/live/live_room_play_info/playurl.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/g_qn_desc.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/p2p_data.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/stream.dart';
|
||||
|
||||
class Playurl {
|
||||
int? cid;
|
||||
List<GQnDesc>? gQnDesc;
|
||||
List<Stream>? stream;
|
||||
P2pData? p2pData;
|
||||
dynamic dolbyQn;
|
||||
|
||||
Playurl({
|
||||
this.cid,
|
||||
this.gQnDesc,
|
||||
this.stream,
|
||||
this.p2pData,
|
||||
this.dolbyQn,
|
||||
});
|
||||
|
||||
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,
|
||||
);
|
||||
}
|
||||
28
lib/models_new/live/live_room_play_info/playurl_info.dart
Normal file
28
lib/models_new/live/live_room_play_info/playurl_info.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/expected_quality.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/playurl.dart';
|
||||
|
||||
class PlayurlInfo {
|
||||
String? confJson;
|
||||
Playurl? playurl;
|
||||
ExpectedQuality? expectedQuality;
|
||||
int? qnDescMoreAb;
|
||||
|
||||
PlayurlInfo({
|
||||
this.confJson,
|
||||
this.playurl,
|
||||
this.expectedQuality,
|
||||
this.qnDescMoreAb,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/live/live_room_play_info/stream.dart
Normal file
15
lib/models_new/live/live_room_play_info/stream.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/format.dart';
|
||||
|
||||
class Stream {
|
||||
String? protocolName;
|
||||
List<Format>? format;
|
||||
|
||||
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(),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/live/live_room_play_info/url_info.dart
Normal file
13
lib/models_new/live/live_room_play_info/url_info.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class UrlInfo {
|
||||
String? host;
|
||||
String? extra;
|
||||
int? streamTtl;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
39
lib/models_new/live/live_search/data.dart
Normal file
39
lib/models_new/live/live_search/data.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
import 'package:PiliPlus/models_new/live/live_search/room.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_search/user.dart';
|
||||
|
||||
class LiveSearchData {
|
||||
String? type;
|
||||
int? page;
|
||||
int? pagesize;
|
||||
Room? room;
|
||||
User? user;
|
||||
String? trackId;
|
||||
String? abtestId;
|
||||
String? query;
|
||||
|
||||
LiveSearchData({
|
||||
this.type,
|
||||
this.page,
|
||||
this.pagesize,
|
||||
this.room,
|
||||
this.user,
|
||||
this.trackId,
|
||||
this.abtestId,
|
||||
this.query,
|
||||
});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
19
lib/models_new/live/live_search/live_search.dart
Normal file
19
lib/models_new/live/live_search/live_search.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/live/live_search/data.dart';
|
||||
|
||||
class LiveSearch {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
LiveSearchData? data;
|
||||
|
||||
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>),
|
||||
);
|
||||
}
|
||||
18
lib/models_new/live/live_search/room.dart
Normal file
18
lib/models_new/live/live_search/room.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/live/live_search/room_item.dart';
|
||||
|
||||
class Room {
|
||||
List<LiveSearchRoomItemModel>? list;
|
||||
int? totalRoom;
|
||||
int? totalPage;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
38
lib/models_new/live/live_search/room_item.dart
Normal file
38
lib/models_new/live/live_search/room_item.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
|
||||
|
||||
class LiveSearchRoomItemModel {
|
||||
int? roomid;
|
||||
String? cover;
|
||||
String? title;
|
||||
String? name;
|
||||
String? face;
|
||||
int? online;
|
||||
String? link;
|
||||
WatchedShow? watchedShow;
|
||||
|
||||
LiveSearchRoomItemModel({
|
||||
this.roomid,
|
||||
this.cover,
|
||||
this.title,
|
||||
this.name,
|
||||
this.face,
|
||||
this.online,
|
||||
this.link,
|
||||
this.watchedShow,
|
||||
});
|
||||
|
||||
factory LiveSearchRoomItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
LiveSearchRoomItemModel(
|
||||
roomid: json['roomid'] as int?,
|
||||
cover: json['cover'] as String?,
|
||||
title: json['title'] as String?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
online: json['online'] as int?,
|
||||
link: json['link'] as String?,
|
||||
watchedShow: json['watched_show'] == null
|
||||
? null
|
||||
: WatchedShow.fromJson(
|
||||
json['watched_show'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
17
lib/models_new/live/live_search/user.dart
Normal file
17
lib/models_new/live/live_search/user.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:PiliPlus/models_new/live/live_search/user_item.dart';
|
||||
|
||||
class User {
|
||||
List<LiveSearchUserItemModel>? list;
|
||||
int? totalUser;
|
||||
int? totalPage;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
30
lib/models_new/live/live_search/user_item.dart
Normal file
30
lib/models_new/live/live_search/user_item.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
class LiveSearchUserItemModel {
|
||||
String? face;
|
||||
String? name;
|
||||
int? liveStatus;
|
||||
String? areaName;
|
||||
int? fansNum;
|
||||
int? roomid;
|
||||
String? link;
|
||||
|
||||
LiveSearchUserItemModel({
|
||||
this.face,
|
||||
this.name,
|
||||
this.liveStatus,
|
||||
this.areaName,
|
||||
this.fansNum,
|
||||
this.roomid,
|
||||
this.link,
|
||||
});
|
||||
|
||||
factory LiveSearchUserItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
LiveSearchUserItemModel(
|
||||
face: json['face'] as String?,
|
||||
name: json['name'] as String?,
|
||||
liveStatus: json['live_status'] as int?,
|
||||
areaName: json['areaName'] as String?,
|
||||
fansNum: json['fansNum'] as int?,
|
||||
roomid: json['roomid'] as int?,
|
||||
link: json['link'] as String?,
|
||||
);
|
||||
}
|
||||
24
lib/models_new/live/live_second_list/data.dart
Normal file
24
lib/models_new/live/live_second_list/data.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_list_item.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_second_list/tag.dart';
|
||||
|
||||
class LiveSecondData {
|
||||
int? count;
|
||||
List<CardLiveItem>? cardList;
|
||||
List<LiveSecondTag>? newTags;
|
||||
|
||||
LiveSecondData({
|
||||
this.count,
|
||||
this.cardList,
|
||||
this.newTags,
|
||||
});
|
||||
|
||||
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(),
|
||||
);
|
||||
}
|
||||
17
lib/models_new/live/live_second_list/tag.dart
Normal file
17
lib/models_new/live/live_second_list/tag.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
class LiveSecondTag {
|
||||
int? id;
|
||||
String? name;
|
||||
String? sortType;
|
||||
|
||||
LiveSecondTag({
|
||||
this.id,
|
||||
this.name,
|
||||
this.sortType,
|
||||
});
|
||||
|
||||
factory LiveSecondTag.fromJson(Map json) => LiveSecondTag(
|
||||
id: json['id'],
|
||||
name: json['name'],
|
||||
sortType: json['sort_type'],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user