mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-25 19:46:47 +08:00
@@ -1,85 +0,0 @@
|
||||
import 'package:PiliPlus/models/article_info/share_channel.dart';
|
||||
import 'package:PiliPlus/models/article_info/stats.dart';
|
||||
|
||||
class ArticleInfoData {
|
||||
int? like;
|
||||
bool? attention;
|
||||
bool? favorite;
|
||||
int? coin;
|
||||
Stats? stats;
|
||||
String? title;
|
||||
String? bannerUrl;
|
||||
int? mid;
|
||||
String? authorName;
|
||||
bool? isAuthor;
|
||||
List? imageUrls;
|
||||
List? originImageUrls;
|
||||
bool? shareable;
|
||||
bool? showLaterWatch;
|
||||
bool? showSmallWindow;
|
||||
bool? inList;
|
||||
int? pre;
|
||||
int? next;
|
||||
List<ShareChannel>? shareChannels;
|
||||
int? type;
|
||||
String? videoUrl;
|
||||
String? location;
|
||||
bool? disableShare;
|
||||
|
||||
ArticleInfoData({
|
||||
this.like,
|
||||
this.attention,
|
||||
this.favorite,
|
||||
this.coin,
|
||||
this.stats,
|
||||
this.title,
|
||||
this.bannerUrl,
|
||||
this.mid,
|
||||
this.authorName,
|
||||
this.isAuthor,
|
||||
this.imageUrls,
|
||||
this.originImageUrls,
|
||||
this.shareable,
|
||||
this.showLaterWatch,
|
||||
this.showSmallWindow,
|
||||
this.inList,
|
||||
this.pre,
|
||||
this.next,
|
||||
this.shareChannels,
|
||||
this.type,
|
||||
this.videoUrl,
|
||||
this.location,
|
||||
this.disableShare,
|
||||
});
|
||||
|
||||
factory ArticleInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleInfoData(
|
||||
like: json['like'] as int?,
|
||||
attention: json['attention'] as bool?,
|
||||
favorite: json['favorite'] as bool?,
|
||||
coin: json['coin'] as int?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
title: json['title'] as String?,
|
||||
bannerUrl: json['banner_url'] as String?,
|
||||
mid: json['mid'] as int?,
|
||||
authorName: json['author_name'] as String?,
|
||||
isAuthor: json['is_author'] as bool?,
|
||||
imageUrls: json['image_urls'],
|
||||
originImageUrls: json['origin_image_urls'],
|
||||
shareable: json['shareable'] as bool?,
|
||||
showLaterWatch: json['show_later_watch'] as bool?,
|
||||
showSmallWindow: json['show_small_window'] as bool?,
|
||||
inList: json['in_list'] as bool?,
|
||||
pre: json['pre'] as int?,
|
||||
next: json['next'] as int?,
|
||||
shareChannels: (json['share_channels'] as List<dynamic>?)
|
||||
?.map((e) => ShareChannel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
type: json['type'] as int?,
|
||||
videoUrl: json['video_url'] as String?,
|
||||
location: json['location'] as String?,
|
||||
disableShare: json['disable_share'] as bool?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class ShareChannel {
|
||||
String? name;
|
||||
String? picture;
|
||||
String? shareChannel;
|
||||
|
||||
ShareChannel({this.name, this.picture, this.shareChannel});
|
||||
|
||||
factory ShareChannel.fromJson(Map<String, dynamic> json) => ShareChannel(
|
||||
name: json['name'] as String?,
|
||||
picture: json['picture'] as String?,
|
||||
shareChannel: json['share_channel'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
class BfsResData {
|
||||
String? imageUrl;
|
||||
int? imageWidth;
|
||||
int? imageHeight;
|
||||
double? imgSize;
|
||||
|
||||
BfsResData({this.imageUrl, this.imageWidth, this.imageHeight, this.imgSize});
|
||||
|
||||
factory BfsResData.fromJson(Map<String, dynamic> json) => BfsResData(
|
||||
imageUrl: json['image_url'] as String?,
|
||||
imageWidth: json['image_width'] as int?,
|
||||
imageHeight: json['image_height'] as int?,
|
||||
imgSize: (json['img_size'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'image_url': imageUrl,
|
||||
'image_width': imageWidth,
|
||||
'image_height': imageHeight,
|
||||
'img_size': imgSize,
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
enum EpisodeType {
|
||||
part('分P'),
|
||||
season('合集'),
|
||||
bangumi('番剧');
|
||||
pgc('番剧');
|
||||
|
||||
final String title;
|
||||
const EpisodeType(this.title);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import 'package:PiliPlus/models/common/enum_with_label.dart';
|
||||
import 'package:PiliPlus/pages/bangumi/controller.dart';
|
||||
import 'package:PiliPlus/pages/bangumi/view.dart';
|
||||
import 'package:PiliPlus/pages/common/common_controller.dart';
|
||||
import 'package:PiliPlus/pages/hot/controller.dart';
|
||||
import 'package:PiliPlus/pages/hot/view.dart';
|
||||
import 'package:PiliPlus/pages/live/controller.dart';
|
||||
import 'package:PiliPlus/pages/live/view.dart';
|
||||
import 'package:PiliPlus/pages/pgc/controller.dart';
|
||||
import 'package:PiliPlus/pages/pgc/view.dart';
|
||||
import 'package:PiliPlus/pages/rank/controller.dart';
|
||||
import 'package:PiliPlus/pages/rank/view.dart';
|
||||
import 'package:PiliPlus/pages/rcmd/controller.dart';
|
||||
@@ -32,7 +32,7 @@ enum HomeTabType implements EnumWithLabel {
|
||||
HomeTabType.rank =>
|
||||
(Get.find<RankController>) as ScrollOrRefreshMixin Function(),
|
||||
HomeTabType.bangumi || HomeTabType.cinema => () =>
|
||||
Get.find<BangumiController>(tag: name),
|
||||
Get.find<PgcController>(tag: name),
|
||||
};
|
||||
|
||||
Widget get page => switch (this) {
|
||||
@@ -40,7 +40,7 @@ enum HomeTabType implements EnumWithLabel {
|
||||
HomeTabType.rcmd => const RcmdPage(),
|
||||
HomeTabType.hot => const HotPage(),
|
||||
HomeTabType.rank => const RankPage(),
|
||||
HomeTabType.bangumi => const BangumiPage(tabType: HomeTabType.bangumi),
|
||||
HomeTabType.cinema => const BangumiPage(tabType: HomeTabType.cinema),
|
||||
HomeTabType.bangumi => const PgcPage(tabType: HomeTabType.bangumi),
|
||||
HomeTabType.cinema => const PgcPage(tabType: HomeTabType.cinema),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -402,86 +402,3 @@ class Code {
|
||||
lang = json['lang'];
|
||||
}
|
||||
}
|
||||
|
||||
// class ArticleContentModel {
|
||||
// ArticleContentModel({
|
||||
// this.attributes,
|
||||
// this.insert,
|
||||
// });
|
||||
// Attributes? attributes;
|
||||
// dynamic insert;
|
||||
|
||||
// ArticleContentModel.fromJson(Map<String, dynamic> json) {
|
||||
// attributes = json['attributes'] == null
|
||||
// ? null
|
||||
// : Attributes.fromJson(json['attributes']);
|
||||
// insert = json['insert'] == null
|
||||
// ? null
|
||||
// : json['attributes']?['class'] == 'normal-img'
|
||||
// ? Insert.fromJson(json['insert'])
|
||||
// : json['insert'];
|
||||
// }
|
||||
// }
|
||||
|
||||
// class Insert {
|
||||
// Insert({
|
||||
// this.nativeImage,
|
||||
// });
|
||||
// NativeImage? nativeImage;
|
||||
|
||||
// Insert.fromJson(Map<String, dynamic> json) {
|
||||
// nativeImage = json['native-image'] == null
|
||||
// ? null
|
||||
// : NativeImage.fromJson(json['native-image']);
|
||||
// }
|
||||
// }
|
||||
|
||||
// class NativeImage {
|
||||
// NativeImage({
|
||||
// this.alt,
|
||||
// this.url,
|
||||
// this.width,
|
||||
// this.height,
|
||||
// this.size,
|
||||
// this.status,
|
||||
// });
|
||||
|
||||
// dynamic alt;
|
||||
// dynamic url;
|
||||
// dynamic width;
|
||||
// dynamic height;
|
||||
// dynamic size;
|
||||
// dynamic status;
|
||||
|
||||
// NativeImage.fromJson(Map<String, dynamic> json) {
|
||||
// alt = json['alt'];
|
||||
// url = json['url'];
|
||||
// width = json['width'];
|
||||
// height = json['height'];
|
||||
// size = json['size'];
|
||||
// status = json['status'];
|
||||
// }
|
||||
// }
|
||||
|
||||
// class Attributes {
|
||||
// Attributes({
|
||||
// this.clazz,
|
||||
// this.bold,
|
||||
// this.color,
|
||||
// this.italic,
|
||||
// this.strike,
|
||||
// });
|
||||
// String? clazz;
|
||||
// bool? bold;
|
||||
// String? color;
|
||||
// bool? italic;
|
||||
// bool? strike;
|
||||
|
||||
// Attributes.fromJson(Map<String, dynamic> json) {
|
||||
// clazz = json['class'];
|
||||
// bold = json['bold'];
|
||||
// color = json['color'];
|
||||
// italic = json['italic'];
|
||||
// strike = json['strike'];
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
import 'package:PiliPlus/models/dynamics/article_list/list.dart';
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models/space_article/item.dart';
|
||||
|
||||
class ArticleListData {
|
||||
ArticleList? list;
|
||||
List<SpaceArticleItem>? articles;
|
||||
Owner? author;
|
||||
bool? attention;
|
||||
|
||||
ArticleListData({
|
||||
this.list,
|
||||
this.articles,
|
||||
this.author,
|
||||
this.attention,
|
||||
});
|
||||
|
||||
factory ArticleListData.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleListData(
|
||||
list: json['list'] == null
|
||||
? null
|
||||
: ArticleList.fromJson(json['list'] as Map<String, dynamic>),
|
||||
articles: (json['articles'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArticleItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Owner.fromJson(json['author'] as Map<String, dynamic>),
|
||||
attention: json['attention'] as bool?,
|
||||
);
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
class ArticleList {
|
||||
int? id;
|
||||
int? mid;
|
||||
String? name;
|
||||
String? imageUrl;
|
||||
int? updateTime;
|
||||
int? ctime;
|
||||
int? publishTime;
|
||||
String? summary;
|
||||
int? words;
|
||||
int? read;
|
||||
int? articlesCount;
|
||||
int? state;
|
||||
String? reason;
|
||||
String? applyTime;
|
||||
String? checkTime;
|
||||
|
||||
ArticleList({
|
||||
this.id,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.imageUrl,
|
||||
this.updateTime,
|
||||
this.ctime,
|
||||
this.publishTime,
|
||||
this.summary,
|
||||
this.words,
|
||||
this.read,
|
||||
this.articlesCount,
|
||||
this.state,
|
||||
this.reason,
|
||||
this.applyTime,
|
||||
this.checkTime,
|
||||
});
|
||||
|
||||
factory ArticleList.fromJson(Map<String, dynamic> json) => ArticleList(
|
||||
id: json['id'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
imageUrl: json['image_url'] as String?,
|
||||
updateTime: json['update_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
summary: json['summary'] as String?,
|
||||
words: json['words'] as int?,
|
||||
read: json['read'] as int?,
|
||||
articlesCount: json['articles_count'] as int?,
|
||||
state: json['state'] as int?,
|
||||
reason: json['reason'] as String?,
|
||||
applyTime: json['apply_time'] as String?,
|
||||
checkTime: json['check_time'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'mid': mid,
|
||||
'name': name,
|
||||
'image_url': imageUrl,
|
||||
'update_time': updateTime,
|
||||
'ctime': ctime,
|
||||
'publish_time': publishTime,
|
||||
'summary': summary,
|
||||
'words': words,
|
||||
'read': read,
|
||||
'articles_count': articlesCount,
|
||||
'state': state,
|
||||
'reason': reason,
|
||||
'apply_time': applyTime,
|
||||
'check_time': checkTime,
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
class Attributes {
|
||||
String? clazz;
|
||||
|
||||
Attributes({this.clazz});
|
||||
|
||||
factory Attributes.fromJson(Map<String, dynamic> json) => Attributes(
|
||||
clazz: json['class'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
import 'package:PiliPlus/models/dynamics/article_opus/attributes.dart';
|
||||
|
||||
class ReadOpusModel {
|
||||
dynamic insert;
|
||||
Attributes? attributes;
|
||||
|
||||
ReadOpusModel({this.insert, this.attributes});
|
||||
|
||||
ReadOpusModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['insert'] is Map) {
|
||||
insert = Insert.fromJson(json['insert']);
|
||||
} else {
|
||||
insert = json['insert'];
|
||||
}
|
||||
attributes = json['attributes'] == null
|
||||
? null
|
||||
: Attributes.fromJson(json['attributes'] as Map<String, dynamic>);
|
||||
}
|
||||
}
|
||||
|
||||
class Insert {
|
||||
InsertCard? card;
|
||||
|
||||
Insert({
|
||||
this.card,
|
||||
});
|
||||
|
||||
Insert.fromJson(Map<String, dynamic> json) {
|
||||
if (json['article-card'] != null) {
|
||||
card = InsertCard.fromJson(json['article-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['live-card'] != null) {
|
||||
card = InsertCard.fromJson(json['live-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['goods-card'] != null) {
|
||||
card = InsertCard.fromJson(json['goods-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['video-card'] != null) {
|
||||
card = InsertCard.fromJson(json['video-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['mall-card'] != null) {
|
||||
card = InsertCard.fromJson(json['mall-card']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json['vote-card'] != null) {
|
||||
card = InsertCard.fromJson(json['vote-card']);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class InsertCard {
|
||||
dynamic tid;
|
||||
String? id;
|
||||
dynamic alt;
|
||||
String? url;
|
||||
num? width;
|
||||
num? height;
|
||||
num? size;
|
||||
String? status;
|
||||
|
||||
InsertCard({
|
||||
this.tid,
|
||||
this.id,
|
||||
this.alt,
|
||||
this.url,
|
||||
this.width,
|
||||
this.height,
|
||||
this.size,
|
||||
this.status,
|
||||
});
|
||||
|
||||
InsertCard.fromJson(Map<String, dynamic> json) {
|
||||
tid = json['tid'];
|
||||
id = json['id'] == '' ? null : json['id'];
|
||||
alt = json['alt'];
|
||||
url = json['url'];
|
||||
width = json['width'];
|
||||
height = json['height'];
|
||||
size = json['size'];
|
||||
status = json['status'];
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
class DynReserveData {
|
||||
int? finalBtnStatus;
|
||||
int? btnMode;
|
||||
int? reserveUpdate;
|
||||
String? descUpdate;
|
||||
String? toast;
|
||||
|
||||
DynReserveData({
|
||||
this.finalBtnStatus,
|
||||
this.btnMode,
|
||||
this.reserveUpdate,
|
||||
this.descUpdate,
|
||||
this.toast,
|
||||
});
|
||||
|
||||
factory DynReserveData.fromJson(Map<String, dynamic> json) => DynReserveData(
|
||||
finalBtnStatus: json['final_btn_status'] as int?,
|
||||
btnMode: json['btn_mode'] as int?,
|
||||
reserveUpdate: json['reserve_update'] as int?,
|
||||
descUpdate: json['desc_update'] as String?,
|
||||
toast: json['toast'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'final_btn_status': finalBtnStatus,
|
||||
'btn_mode': btnMode,
|
||||
'reserve_update': reserveUpdate,
|
||||
'desc_update': descUpdate,
|
||||
'toast': toast,
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class AllSortBy {
|
||||
int? sortBy;
|
||||
String? sortName;
|
||||
|
||||
AllSortBy({this.sortBy, this.sortName});
|
||||
|
||||
factory AllSortBy.fromJson(Map<String, dynamic> json) => AllSortBy(
|
||||
sortBy: json['sort_by'] as int?,
|
||||
sortName: json['sort_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'sort_by': sortBy,
|
||||
'sort_name': sortName,
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
|
||||
class TopicCardItem {
|
||||
DynamicItemModel? dynamicCardItem;
|
||||
String? topicType;
|
||||
|
||||
TopicCardItem({this.dynamicCardItem, this.topicType});
|
||||
|
||||
factory TopicCardItem.fromJson(Map<String, dynamic> json) => TopicCardItem(
|
||||
dynamicCardItem: json['dynamic_card_item'] == null
|
||||
? null
|
||||
: DynamicItemModel.fromJson(
|
||||
json['dynamic_card_item'] as Map<String, dynamic>),
|
||||
topicType: json['topic_type'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
import 'package:PiliPlus/models/dynamics/dyn_topic_feed/item.dart';
|
||||
import 'package:PiliPlus/models/dynamics/dyn_topic_feed/topic_sort_by_conf.dart';
|
||||
|
||||
class TopicCardList {
|
||||
bool? hasMore;
|
||||
List<TopicCardItem>? items;
|
||||
String? offset;
|
||||
TopicSortByConf? topicSortByConf;
|
||||
|
||||
TopicCardList({
|
||||
this.hasMore,
|
||||
this.items,
|
||||
this.offset,
|
||||
this.topicSortByConf,
|
||||
});
|
||||
|
||||
factory TopicCardList.fromJson(Map<String, dynamic> json) => TopicCardList(
|
||||
hasMore: json['has_more'] as bool?,
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => TopicCardItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
offset: json['offset'] as String?,
|
||||
topicSortByConf: json['topic_sort_by_conf'] == null
|
||||
? null
|
||||
: TopicSortByConf.fromJson(
|
||||
json['topic_sort_by_conf'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import 'package:PiliPlus/models/dynamics/dyn_topic_feed/all_sort_by.dart';
|
||||
|
||||
class TopicSortByConf {
|
||||
List<AllSortBy>? allSortBy;
|
||||
int? defaultSortBy;
|
||||
int? showSortBy;
|
||||
|
||||
TopicSortByConf({this.allSortBy, this.defaultSortBy, this.showSortBy});
|
||||
|
||||
factory TopicSortByConf.fromJson(Map<String, dynamic> json) {
|
||||
return TopicSortByConf(
|
||||
allSortBy: (json['all_sort_by'] as List<dynamic>?)
|
||||
?.map((e) => AllSortBy.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
defaultSortBy: json['default_sort_by'] as int?,
|
||||
showSortBy: json['show_sort_by'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'all_sort_by': allSortBy?.map((e) => e.toJson()).toList(),
|
||||
'default_sort_by': defaultSortBy,
|
||||
'show_sort_by': showSortBy,
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import 'package:PiliPlus/models/dynamics/dyn_topic_top/topic_creator.dart';
|
||||
import 'package:PiliPlus/models/dynamics/dyn_topic_top/topic_item.dart';
|
||||
|
||||
class TopDetails {
|
||||
TopicItem? topicItem;
|
||||
TopicCreator? topicCreator;
|
||||
bool? hasCreateJurisdiction;
|
||||
int? wordColor;
|
||||
bool? closePubLayerEntry;
|
||||
|
||||
TopDetails({
|
||||
this.topicItem,
|
||||
this.topicCreator,
|
||||
this.hasCreateJurisdiction,
|
||||
this.wordColor,
|
||||
this.closePubLayerEntry,
|
||||
});
|
||||
|
||||
factory TopDetails.fromJson(Map<String, dynamic> json) => TopDetails(
|
||||
topicItem: json['topic_item'] == null
|
||||
? null
|
||||
: TopicItem.fromJson(json['topic_item'] as Map<String, dynamic>),
|
||||
topicCreator: json['topic_creator'] == null
|
||||
? null
|
||||
: TopicCreator.fromJson(
|
||||
json['topic_creator'] as Map<String, dynamic>),
|
||||
hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?,
|
||||
wordColor: json['word_color'] as int?,
|
||||
closePubLayerEntry: json['close_pub_layer_entry'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'topic_item': topicItem?.toJson(),
|
||||
'topic_creator': topicCreator?.toJson(),
|
||||
'has_create_jurisdiction': hasCreateJurisdiction,
|
||||
'word_color': wordColor,
|
||||
'close_pub_layer_entry': closePubLayerEntry,
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
class TopicCreator {
|
||||
int? uid;
|
||||
String? face;
|
||||
String? name;
|
||||
|
||||
TopicCreator({
|
||||
this.uid,
|
||||
this.face,
|
||||
this.name,
|
||||
});
|
||||
|
||||
factory TopicCreator.fromJson(Map<String, dynamic> json) => TopicCreator(
|
||||
uid: json['uid'] as int?,
|
||||
face: json['face'] as String?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'uid': uid,
|
||||
'face': face,
|
||||
'name': name,
|
||||
};
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
class TopicItem {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
late int fav;
|
||||
late int like;
|
||||
int? dynamics;
|
||||
String? jumpUrl;
|
||||
String? backColor;
|
||||
String? description;
|
||||
String? sharePic;
|
||||
String? shareUrl;
|
||||
int? ctime;
|
||||
bool? showInteractData;
|
||||
bool? isFav;
|
||||
bool? isLike;
|
||||
|
||||
TopicItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
required this.fav,
|
||||
required this.like,
|
||||
this.dynamics,
|
||||
this.jumpUrl,
|
||||
this.backColor,
|
||||
this.description,
|
||||
this.sharePic,
|
||||
this.shareUrl,
|
||||
this.ctime,
|
||||
this.showInteractData,
|
||||
this.isFav,
|
||||
this.isLike,
|
||||
});
|
||||
|
||||
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int? ?? 0,
|
||||
discuss: json['discuss'] as int? ?? 0,
|
||||
fav: json['fav'] as int? ?? 0,
|
||||
like: json['like'] as int? ?? 0,
|
||||
dynamics: json['dynamics'] as int?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
backColor: json['back_color'] as String?,
|
||||
description: json['description'] as String?,
|
||||
sharePic: json['share_pic'] as String?,
|
||||
shareUrl: json['share_url'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
isFav: json['is_fav'] as bool?,
|
||||
isLike: json['is_like'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'view': view,
|
||||
'discuss': discuss,
|
||||
'fav': fav,
|
||||
'dynamics': dynamics,
|
||||
'jump_url': jumpUrl,
|
||||
'back_color': backColor,
|
||||
'description': description,
|
||||
'share_pic': sharePic,
|
||||
'share_url': shareUrl,
|
||||
'ctime': ctime,
|
||||
'show_interact_data': showInteractData,
|
||||
};
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import 'dart:convert';
|
||||
import 'package:PiliPlus/common/widgets/pendant_avatar.dart';
|
||||
import 'package:PiliPlus/models/dynamics/article_content_model.dart';
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
|
||||
|
||||
class DynamicsDataModel {
|
||||
bool? hasMore;
|
||||
@@ -55,7 +56,7 @@ class DynamicItemModel {
|
||||
modules = json['item']?['modules'] == null
|
||||
? ItemModulesModel()
|
||||
: ItemModulesModel.fromOpusJson(
|
||||
(json['item']?['modules'] as List).cast());
|
||||
(json['item']['modules'] as List).cast());
|
||||
|
||||
if (json['fallback'] != null) {
|
||||
fallback = Fallback.fromJson(json['fallback']);
|
||||
@@ -1071,27 +1072,6 @@ class LivePlayInfo {
|
||||
);
|
||||
}
|
||||
|
||||
class WatchedShow {
|
||||
bool? watchedShowSwitch;
|
||||
int? num;
|
||||
String? textSmall;
|
||||
String? textLarge;
|
||||
|
||||
WatchedShow({
|
||||
this.watchedShowSwitch,
|
||||
this.num,
|
||||
this.textSmall,
|
||||
this.textLarge,
|
||||
});
|
||||
|
||||
factory WatchedShow.fromJson(Map<String, dynamic> json) => WatchedShow(
|
||||
watchedShowSwitch: json["switch"],
|
||||
num: json["num"],
|
||||
textSmall: json["text_small"],
|
||||
textLarge: json["text_large"],
|
||||
);
|
||||
}
|
||||
|
||||
class DynamicTopicModel {
|
||||
DynamicTopicModel({
|
||||
this.id,
|
||||
@@ -1443,9 +1423,11 @@ class ModuleStatModel {
|
||||
// DynamicStat? coin;
|
||||
|
||||
ModuleStatModel.fromJson(Map<String, dynamic> json) {
|
||||
comment = DynamicStat.fromJson(json['comment']);
|
||||
forward = DynamicStat.fromJson(json['forward']);
|
||||
like = DynamicStat.fromJson(json['like']);
|
||||
comment =
|
||||
json['comment'] == null ? null : DynamicStat.fromJson(json['comment']);
|
||||
forward =
|
||||
json['forward'] == null ? null : DynamicStat.fromJson(json['forward']);
|
||||
like = json['like'] == null ? null : DynamicStat.fromJson(json['like']);
|
||||
if (json['favorite'] != null) {
|
||||
favorite = DynamicStat.fromJson(json['favorite']);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class VoteInfo extends SimpleVoteInfo {
|
||||
myVotes = (json['my_votes'] as List?)?.cast(); // doVote
|
||||
options =
|
||||
(json['options'] as List?)?.map((v) => Option.fromJson(v)).toList() ??
|
||||
[];
|
||||
<Option>[];
|
||||
optionsCnt = json['options_cnt'];
|
||||
voterLevel = json['voter_level'];
|
||||
face = json['face'];
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class FansDataModel {
|
||||
FansDataModel({
|
||||
this.total,
|
||||
this.list,
|
||||
});
|
||||
|
||||
int? total;
|
||||
List<FansItemModel>? list;
|
||||
|
||||
FansDataModel.fromJson(Map<String, dynamic> json) {
|
||||
total = json['total'];
|
||||
list = (json['list'] as List?)
|
||||
?.map<FansItemModel>((e) => FansItemModel.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
class FansItemModel {
|
||||
FansItemModel({
|
||||
this.mid,
|
||||
this.attribute,
|
||||
this.mtime,
|
||||
this.tag,
|
||||
this.special,
|
||||
this.uname,
|
||||
this.face,
|
||||
this.sign,
|
||||
this.officialVerify,
|
||||
});
|
||||
|
||||
int? mid;
|
||||
int? attribute;
|
||||
int? mtime;
|
||||
List? tag;
|
||||
int? special;
|
||||
String? uname;
|
||||
String? face;
|
||||
String? sign;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
|
||||
FansItemModel.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
attribute = json['attribute'];
|
||||
mtime = json['mtime'];
|
||||
tag = json['tag'];
|
||||
special = json['special'];
|
||||
uname = json['uname'];
|
||||
face = json['face'];
|
||||
sign = json['sign'] == '' ? '还没有签名' : json['sign'];
|
||||
officialVerify = json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(json['official_verify']);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class Author {
|
||||
Author({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
});
|
||||
String? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
|
||||
Author.fromJson(Map<String, dynamic> json) {
|
||||
mid = json["mid"];
|
||||
name = json["name"];
|
||||
face = json['face'];
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class Cover {
|
||||
String? url;
|
||||
int? width;
|
||||
int? height;
|
||||
|
||||
Cover({this.url, this.width, this.height});
|
||||
|
||||
factory Cover.fromJson(Map<String, dynamic> json) => Cover(
|
||||
url: json['url'] as String?,
|
||||
width: json['width'] as int?,
|
||||
height: json['height'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import 'package:PiliPlus/models/fav_article/item.dart';
|
||||
|
||||
class FavArticleData {
|
||||
List<FavArticleItemModel>? items;
|
||||
bool? hasMore;
|
||||
String? offset;
|
||||
|
||||
FavArticleData({
|
||||
this.items,
|
||||
this.hasMore,
|
||||
this.offset,
|
||||
});
|
||||
|
||||
factory FavArticleData.fromJson(Map<String, dynamic> json) => FavArticleData(
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => FavArticleItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
offset: json['offset'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import 'package:PiliPlus/models/fav_article/author.dart';
|
||||
import 'package:PiliPlus/models/fav_article/cover.dart';
|
||||
import 'package:PiliPlus/models/fav_article/stat.dart';
|
||||
|
||||
class FavArticleItemModel {
|
||||
String? jumpUrl;
|
||||
String? opusId;
|
||||
String? content;
|
||||
dynamic badge;
|
||||
Author? author;
|
||||
Cover? cover;
|
||||
Stat? stat;
|
||||
String? pubTime;
|
||||
|
||||
FavArticleItemModel({
|
||||
this.jumpUrl,
|
||||
this.opusId,
|
||||
this.content,
|
||||
this.badge,
|
||||
this.author,
|
||||
this.cover,
|
||||
this.stat,
|
||||
this.pubTime,
|
||||
});
|
||||
|
||||
factory FavArticleItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FavArticleItemModel(
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
opusId: json['opus_id'] as String?,
|
||||
content: json['content'] as String?,
|
||||
badge: json['badge'] as dynamic,
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
cover: json['cover'] == null
|
||||
? null
|
||||
: Cover.fromJson(json['cover'] as Map<String, dynamic>),
|
||||
stat: json['stat'] == null
|
||||
? null
|
||||
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
|
||||
pubTime: json['pub_time'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class Stat {
|
||||
String? view;
|
||||
String? like;
|
||||
|
||||
Stat({this.view, this.like});
|
||||
|
||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||
view: json['view'] as String?,
|
||||
like: json['like'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import 'package:PiliPlus/models/user/fav_topic/topic_list.dart';
|
||||
|
||||
class FavTopicData {
|
||||
TopicList? topicList;
|
||||
|
||||
FavTopicData({this.topicList});
|
||||
|
||||
factory FavTopicData.fromJson(Map<String, dynamic> json) => FavTopicData(
|
||||
topicList: json['topic_list'] == null
|
||||
? null
|
||||
: TopicList.fromJson(json['topic_list'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'topic_list': topicList?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import 'package:PiliPlus/models/fav_topic/data.dart';
|
||||
|
||||
class FavTopic {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
FavTopicData? data;
|
||||
|
||||
FavTopic({this.code, this.message, this.ttl, this.data});
|
||||
|
||||
factory FavTopic.fromJson(Map<String, dynamic> json) => FavTopic(
|
||||
code: json['code'] as int?,
|
||||
message: json['message'] as String?,
|
||||
ttl: json['ttl'] as int?,
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: FavTopicData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'code': code,
|
||||
'message': message,
|
||||
'ttl': ttl,
|
||||
'data': data?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class PageInfo {
|
||||
int? curPageNum;
|
||||
int? total;
|
||||
|
||||
PageInfo({this.curPageNum, this.total});
|
||||
|
||||
factory PageInfo.fromJson(Map<String, dynamic> json) => PageInfo(
|
||||
curPageNum: json['cur_page_num'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'cur_page_num': curPageNum,
|
||||
'total': total,
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
class FavTopicModel {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
String? jumpUrl;
|
||||
String? statDesc;
|
||||
bool? showInteractData;
|
||||
|
||||
FavTopicModel({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
this.jumpUrl,
|
||||
this.statDesc,
|
||||
this.showInteractData,
|
||||
});
|
||||
|
||||
factory FavTopicModel.fromJson(Map<String, dynamic> json) => FavTopicModel(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int?,
|
||||
discuss: json['discuss'] as int?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
statDesc: json['stat_desc'] as String?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'view': view,
|
||||
'discuss': discuss,
|
||||
'jump_url': jumpUrl,
|
||||
'stat_desc': statDesc,
|
||||
'show_interact_data': showInteractData,
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:PiliPlus/models/user/fav_topic/page_info.dart';
|
||||
import 'package:PiliPlus/models/user/fav_topic/topic_item.dart';
|
||||
|
||||
class TopicList {
|
||||
List<FavTopicModel>? topicItems;
|
||||
PageInfo? pageInfo;
|
||||
|
||||
TopicList({this.topicItems, this.pageInfo});
|
||||
|
||||
factory TopicList.fromJson(Map<String, dynamic> json) => TopicList(
|
||||
topicItems: (json['topic_items'] as List<dynamic>?)
|
||||
?.map((e) => FavTopicModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
pageInfo: json['page_info'] == null
|
||||
? null
|
||||
: PageInfo.fromJson(json['page_info'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'topic_items': topicItems?.map((e) => e.toJson()).toList(),
|
||||
'page_info': pageInfo?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
class CntInfo {
|
||||
int? collect;
|
||||
int? play;
|
||||
int? thumbUp;
|
||||
int? share;
|
||||
|
||||
CntInfo({this.collect, this.play, this.thumbUp, this.share});
|
||||
|
||||
factory CntInfo.fromJson(Map<String, dynamic> json) => CntInfo(
|
||||
collect: json['collect'] as int?,
|
||||
play: json['play'] as int?,
|
||||
thumbUp: json['thumb_up'] as int?,
|
||||
share: json['share'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'collect': collect,
|
||||
'play': play,
|
||||
'thumb_up': thumbUp,
|
||||
'share': share,
|
||||
};
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
import 'package:PiliPlus/models/folder_info/cnt_info.dart';
|
||||
import 'package:PiliPlus/models/folder_info/upper.dart';
|
||||
|
||||
class FolderInfo {
|
||||
int? id;
|
||||
int? fid;
|
||||
int? mid;
|
||||
int? attr;
|
||||
String? title;
|
||||
String? cover;
|
||||
Upper? upper;
|
||||
int? coverType;
|
||||
CntInfo? cntInfo;
|
||||
int? type;
|
||||
String? intro;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? state;
|
||||
int? favState;
|
||||
int? likeState;
|
||||
int? mediaCount;
|
||||
bool? isTop;
|
||||
|
||||
FolderInfo({
|
||||
this.id,
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
this.coverType,
|
||||
this.cntInfo,
|
||||
this.type,
|
||||
this.intro,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.state,
|
||||
this.favState,
|
||||
this.likeState,
|
||||
this.mediaCount,
|
||||
this.isTop,
|
||||
});
|
||||
|
||||
factory FolderInfo.fromJson(Map<String, dynamic> json) => FolderInfo(
|
||||
id: json['id'] as int?,
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
coverType: json['cover_type'] as int?,
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
type: json['type'] as int?,
|
||||
intro: json['intro'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
state: json['state'] as int?,
|
||||
favState: json['fav_state'] as int?,
|
||||
likeState: json['like_state'] as int?,
|
||||
mediaCount: json['media_count'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'fid': fid,
|
||||
'mid': mid,
|
||||
'attr': attr,
|
||||
'title': title,
|
||||
'cover': cover,
|
||||
'upper': upper?.toJson(),
|
||||
'cover_type': coverType,
|
||||
'cnt_info': cntInfo?.toJson(),
|
||||
'type': type,
|
||||
'intro': intro,
|
||||
'ctime': ctime,
|
||||
'mtime': mtime,
|
||||
'state': state,
|
||||
'fav_state': favState,
|
||||
'like_state': likeState,
|
||||
'media_count': mediaCount,
|
||||
'is_top': isTop,
|
||||
};
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
class Upper {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
bool? followed;
|
||||
int? vipType;
|
||||
int? vipStatue;
|
||||
|
||||
Upper({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.followed,
|
||||
this.vipType,
|
||||
this.vipStatue,
|
||||
});
|
||||
|
||||
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
followed: json['followed'] as bool?,
|
||||
vipType: json['vip_type'] as int?,
|
||||
vipStatue: json['vip_statue'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'mid': mid,
|
||||
'name': name,
|
||||
'face': face,
|
||||
'followed': followed,
|
||||
'vip_type': vipType,
|
||||
'vip_statue': vipStatue,
|
||||
};
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class FollowDataModel {
|
||||
FollowDataModel({
|
||||
this.total,
|
||||
this.list,
|
||||
});
|
||||
|
||||
int? total;
|
||||
List<FollowItemModel>? list;
|
||||
|
||||
FollowDataModel.fromJson(Map<String, dynamic> json) {
|
||||
total = json['total'] ?? 0;
|
||||
list = (json['list'] as List?)
|
||||
?.map<FollowItemModel>((e) => FollowItemModel.fromJson(e))
|
||||
.toList() ??
|
||||
[];
|
||||
}
|
||||
}
|
||||
|
||||
class FollowItemModel {
|
||||
FollowItemModel({
|
||||
this.mid,
|
||||
this.attribute,
|
||||
// this.mtime,
|
||||
this.tag,
|
||||
this.special,
|
||||
this.uname,
|
||||
this.face,
|
||||
this.sign,
|
||||
this.officialVerify,
|
||||
});
|
||||
|
||||
int? mid;
|
||||
int? attribute; // 对于`/x/relation/tag`, 此处的attribute似乎恒为0
|
||||
// int? mtime;
|
||||
List? tag;
|
||||
int? special;
|
||||
String? uname;
|
||||
String? face;
|
||||
String? sign;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
|
||||
FollowItemModel.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
attribute = json['attribute'];
|
||||
// mtime = json['mtime'];
|
||||
tag = json['tag'];
|
||||
special = json['special'];
|
||||
uname = json['uname'];
|
||||
face = json['face'];
|
||||
sign = json['sign'] == '' ? '还没有签名' : json['sign'];
|
||||
officialVerify = json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(json['official_verify']);
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
class LatestDataModel {
|
||||
LatestDataModel({
|
||||
this.url,
|
||||
this.tagName,
|
||||
this.createdAt,
|
||||
this.assets,
|
||||
this.body,
|
||||
});
|
||||
|
||||
String? url;
|
||||
String? tagName;
|
||||
String? createdAt;
|
||||
List? assets;
|
||||
String? body;
|
||||
|
||||
LatestDataModel.fromJson(Map<String, dynamic> json) {
|
||||
url = json['url'];
|
||||
tagName = json['tag_name'];
|
||||
createdAt = json['created_at'];
|
||||
assets = (json['assets'] as List?)
|
||||
?.map<AssetItem>((e) => AssetItem.fromJson(e))
|
||||
.toList();
|
||||
body = json['body'];
|
||||
}
|
||||
}
|
||||
|
||||
class AssetItem {
|
||||
AssetItem({
|
||||
this.url,
|
||||
this.name,
|
||||
this.size,
|
||||
this.downloadCount,
|
||||
this.downloadUrl,
|
||||
});
|
||||
|
||||
String? url;
|
||||
String? name;
|
||||
int? size;
|
||||
int? downloadCount;
|
||||
String? downloadUrl;
|
||||
|
||||
AssetItem.fromJson(Map<String, dynamic> json) {
|
||||
url = json['url'];
|
||||
name = json['name'];
|
||||
size = json['size'];
|
||||
downloadCount = json['download_count'];
|
||||
downloadUrl = json['browser_download_url'];
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ class RecVideoItemAppModel extends BaseRecVideoItemModel {
|
||||
aid = id;
|
||||
bvid = json['bvid'] ?? IdUtils.av2bv(id!);
|
||||
cid = json['player_args']?['cid'] ?? 0;
|
||||
pic = json['cover'];
|
||||
cover = json['cover'];
|
||||
stat = RcmdStat.fromJson(json);
|
||||
// 改用player_args中的duration作为原始数据(秒数)
|
||||
duration = json['player_args']?['duration'] ?? 0;
|
||||
@@ -41,7 +41,7 @@ class RecVideoItemAppModel extends BaseRecVideoItemModel {
|
||||
talkBack = json['talk_back'];
|
||||
|
||||
if (json['goto'] == 'bangumi') {
|
||||
bangumiBadge = json['cover_right_text'];
|
||||
pgcBadge = json['cover_right_text'];
|
||||
}
|
||||
|
||||
cardType = json['card_type'];
|
||||
@@ -70,8 +70,8 @@ class RcmdStat implements BaseStat {
|
||||
late String danmuStr;
|
||||
|
||||
RcmdStat.fromJson(Map<String, dynamic> json) {
|
||||
viewStr = json["cover_left_text_1"];
|
||||
danmuStr = json['cover_left_text_2'];
|
||||
viewStr = json["cover_left_text_1"] ?? '';
|
||||
danmuStr = json['cover_left_text_2'] ?? '';
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
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);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import 'package:PiliPlus/models/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(),
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_emoticons/datum.dart';
|
||||
|
||||
class LiveEmoteData {
|
||||
int? fansBrand;
|
||||
List<LiveEmoteDatum>? data;
|
||||
dynamic purchaseUrl;
|
||||
|
||||
LiveEmoteData({this.fansBrand, this.data, this.purchaseUrl});
|
||||
|
||||
factory LiveEmoteData.fromJson(Map<String, dynamic> json) => LiveEmoteData(
|
||||
fansBrand: json['fans_brand'] as int?,
|
||||
data: (json['data'] as List<dynamic>?)
|
||||
?.map((e) => LiveEmoteDatum.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
purchaseUrl: json['purchase_url'] as dynamic,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'fans_brand': fansBrand,
|
||||
'data': data?.map((e) => e.toJson()).toList(),
|
||||
'purchase_url': purchaseUrl,
|
||||
};
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_emoticons/emoticon.dart';
|
||||
import 'package:PiliPlus/models/live/live_emoticons/top_show.dart';
|
||||
import 'package:PiliPlus/models/live/live_emoticons/top_show_recent.dart';
|
||||
|
||||
class LiveEmoteDatum {
|
||||
List<LiveEmoticon>? emoticons;
|
||||
int? pkgId;
|
||||
String? pkgName;
|
||||
int? pkgType;
|
||||
String? pkgDescript;
|
||||
int? pkgPerm;
|
||||
int? unlockIdentity;
|
||||
int? unlockNeedGift;
|
||||
String? currentCover;
|
||||
List<dynamic>? recentlyUsedEmoticons;
|
||||
TopShow? topShow;
|
||||
TopShowRecent? topShowRecent;
|
||||
|
||||
LiveEmoteDatum({
|
||||
this.emoticons,
|
||||
this.pkgId,
|
||||
this.pkgName,
|
||||
this.pkgType,
|
||||
this.pkgDescript,
|
||||
this.pkgPerm,
|
||||
this.unlockIdentity,
|
||||
this.unlockNeedGift,
|
||||
this.currentCover,
|
||||
this.recentlyUsedEmoticons,
|
||||
this.topShow,
|
||||
this.topShowRecent,
|
||||
});
|
||||
|
||||
factory LiveEmoteDatum.fromJson(Map<String, dynamic> json) => LiveEmoteDatum(
|
||||
emoticons: (json['emoticons'] as List<dynamic>?)
|
||||
?.map((e) => LiveEmoticon.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
pkgId: json['pkg_id'] as int?,
|
||||
pkgName: json['pkg_name'] as String?,
|
||||
pkgType: json['pkg_type'] as int?,
|
||||
pkgDescript: json['pkg_descript'] as String?,
|
||||
pkgPerm: json['pkg_perm'] as int?,
|
||||
unlockIdentity: json['unlock_identity'] as int?,
|
||||
unlockNeedGift: json['unlock_need_gift'] as int?,
|
||||
currentCover: json['current_cover'] as String?,
|
||||
recentlyUsedEmoticons:
|
||||
json['recently_used_emoticons'] as List<dynamic>?,
|
||||
topShow: json['top_show'] == null
|
||||
? null
|
||||
: TopShow.fromJson(json['top_show'] as Map<String, dynamic>),
|
||||
topShowRecent: json['top_show_recent'] == null
|
||||
? null
|
||||
: TopShowRecent.fromJson(
|
||||
json['top_show_recent'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'emoticons': emoticons?.map((e) => e.toJson()).toList(),
|
||||
'pkg_id': pkgId,
|
||||
'pkg_name': pkgName,
|
||||
'pkg_type': pkgType,
|
||||
'pkg_descript': pkgDescript,
|
||||
'pkg_perm': pkgPerm,
|
||||
'unlock_identity': unlockIdentity,
|
||||
'unlock_need_gift': unlockNeedGift,
|
||||
'current_cover': currentCover,
|
||||
'recently_used_emoticons': recentlyUsedEmoticons,
|
||||
'top_show': topShow?.toJson(),
|
||||
'top_show_recent': topShowRecent?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
class LiveEmoticon {
|
||||
String? emoji;
|
||||
String? descript;
|
||||
String? url;
|
||||
int? isDynamic;
|
||||
int? inPlayerArea;
|
||||
int? width;
|
||||
int? height;
|
||||
int? identity;
|
||||
int? unlockNeedGift;
|
||||
int? perm;
|
||||
int? unlockNeedLevel;
|
||||
int? emoticonValueType;
|
||||
int? bulgeDisplay;
|
||||
String? unlockShowText;
|
||||
String? unlockShowColor;
|
||||
String? emoticonUnique;
|
||||
String? unlockShowImage;
|
||||
int? emoticonId;
|
||||
|
||||
LiveEmoticon({
|
||||
this.emoji,
|
||||
this.descript,
|
||||
this.url,
|
||||
this.isDynamic,
|
||||
this.inPlayerArea,
|
||||
this.width,
|
||||
this.height,
|
||||
this.identity,
|
||||
this.unlockNeedGift,
|
||||
this.perm,
|
||||
this.unlockNeedLevel,
|
||||
this.emoticonValueType,
|
||||
this.bulgeDisplay,
|
||||
this.unlockShowText,
|
||||
this.unlockShowColor,
|
||||
this.emoticonUnique,
|
||||
this.unlockShowImage,
|
||||
this.emoticonId,
|
||||
});
|
||||
|
||||
factory LiveEmoticon.fromJson(Map<String, dynamic> json) => LiveEmoticon(
|
||||
emoji: json['emoji'] as String?,
|
||||
descript: json['descript'] as String?,
|
||||
url: json['url'] as String?,
|
||||
isDynamic: json['is_dynamic'] as int?,
|
||||
inPlayerArea: json['in_player_area'] as int?,
|
||||
width: json['width'] as int? ?? 0,
|
||||
height: json['height'] as int? ?? 0,
|
||||
identity: json['identity'] as int?,
|
||||
unlockNeedGift: json['unlock_need_gift'] as int?,
|
||||
perm: json['perm'] as int?,
|
||||
unlockNeedLevel: json['unlock_need_level'] as int?,
|
||||
emoticonValueType: json['emoticon_value_type'] as int?,
|
||||
bulgeDisplay: json['bulge_display'] as int?,
|
||||
unlockShowText: json['unlock_show_text'] as String?,
|
||||
unlockShowColor: json['unlock_show_color'] as String?,
|
||||
emoticonUnique: json['emoticon_unique'] as String?,
|
||||
unlockShowImage: json['unlock_show_image'] as String?,
|
||||
emoticonId: json['emoticon_id'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'emoji': emoji,
|
||||
'descript': descript,
|
||||
'url': url,
|
||||
'is_dynamic': isDynamic,
|
||||
'in_player_area': inPlayerArea,
|
||||
'width': width,
|
||||
'height': height,
|
||||
'identity': identity,
|
||||
'unlock_need_gift': unlockNeedGift,
|
||||
'perm': perm,
|
||||
'unlock_need_level': unlockNeedLevel,
|
||||
'emoticon_value_type': emoticonValueType,
|
||||
'bulge_display': bulgeDisplay,
|
||||
'unlock_show_text': unlockShowText,
|
||||
'unlock_show_color': unlockShowColor,
|
||||
'emoticon_unique': emoticonUnique,
|
||||
'unlock_show_image': unlockShowImage,
|
||||
'emoticon_id': emoticonId,
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_emoticons/data.dart';
|
||||
|
||||
class LiveEmoticons {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
LiveEmoteData? data;
|
||||
|
||||
LiveEmoticons({this.code, this.message, this.ttl, this.data});
|
||||
|
||||
factory LiveEmoticons.fromJson(Map<String, dynamic> json) => LiveEmoticons(
|
||||
code: json['code'] as int?,
|
||||
message: json['message'] as String?,
|
||||
ttl: json['ttl'] as int?,
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: LiveEmoteData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'code': code,
|
||||
'message': message,
|
||||
'ttl': ttl,
|
||||
'data': data?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class TopLeft {
|
||||
String? image;
|
||||
String? text;
|
||||
|
||||
TopLeft({this.image, this.text});
|
||||
|
||||
factory TopLeft.fromJson(Map<String, dynamic> json) => TopLeft(
|
||||
image: json['image'] as String?,
|
||||
text: json['text'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'image': image,
|
||||
'text': text,
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class TopRight {
|
||||
String? image;
|
||||
String? text;
|
||||
|
||||
TopRight({this.image, this.text});
|
||||
|
||||
factory TopRight.fromJson(Map<String, dynamic> json) => TopRight(
|
||||
image: json['image'] as String?,
|
||||
text: json['text'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'image': image,
|
||||
'text': text,
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_emoticons/top_left.dart';
|
||||
import 'package:PiliPlus/models/live/live_emoticons/top_right.dart';
|
||||
|
||||
class TopShow {
|
||||
TopLeft? topLeft;
|
||||
TopRight? topRight;
|
||||
|
||||
TopShow({this.topLeft, this.topRight});
|
||||
|
||||
factory TopShow.fromJson(Map<String, dynamic> json) => TopShow(
|
||||
topLeft: json['top_left'] == null
|
||||
? null
|
||||
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
|
||||
topRight: json['top_right'] == null
|
||||
? null
|
||||
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'top_left': topLeft?.toJson(),
|
||||
'top_right': topRight?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_emoticons/top_left.dart';
|
||||
import 'package:PiliPlus/models/live/live_emoticons/top_right.dart';
|
||||
|
||||
class TopShowRecent {
|
||||
TopLeft? topLeft;
|
||||
TopRight? topRight;
|
||||
|
||||
TopShowRecent({this.topLeft, this.topRight});
|
||||
|
||||
factory TopShowRecent.fromJson(Map<String, dynamic> json) => TopShowRecent(
|
||||
topLeft: json['top_left'] == null
|
||||
? null
|
||||
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
|
||||
topRight: json['top_right'] == null
|
||||
? null
|
||||
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'top_left': topLeft?.toJson(),
|
||||
'top_right': topRight?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_feed_index/card_data_item.dart';
|
||||
import 'package:PiliPlus/models/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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'banner_v2': bannerV2?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart';
|
||||
import 'package:PiliPlus/models/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>),
|
||||
);
|
||||
|
||||
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'];
|
||||
}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
import 'package:PiliPlus/models/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'],
|
||||
);
|
||||
|
||||
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,
|
||||
'link': link,
|
||||
'official_verify': officialVerify,
|
||||
'current_qn': currentQn,
|
||||
'watched_show': watchedShow?.toJson(),
|
||||
'status_text': statusText,
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
import 'package:PiliPlus/models/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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'card_type': cardType,
|
||||
'card_data': cardData?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
import 'package:PiliPlus/models/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?;
|
||||
}
|
||||
|
||||
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,
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import 'package:PiliPlus/models/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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'code': code,
|
||||
'message': message,
|
||||
'ttl': ttl,
|
||||
'data': data?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
import 'package:PiliPlus/models/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>?;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'title': title,
|
||||
'pageSize': pageSize,
|
||||
'totalPage': totalPage,
|
||||
'list': list?.map((e) => e.toJson()).toList(),
|
||||
'count': count,
|
||||
'never_lived_count': neverLivedCount,
|
||||
'live_count': liveCount,
|
||||
'never_lived_faces': neverLivedFaces,
|
||||
};
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
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?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'roomid': roomid,
|
||||
'uid': uid,
|
||||
'uname': uname,
|
||||
'title': title,
|
||||
'face': face,
|
||||
'live_status': liveStatus,
|
||||
'record_num': recordNum,
|
||||
'recent_record_id': recentRecordId,
|
||||
'is_attention': isAttention,
|
||||
'clipnum': clipnum,
|
||||
'fans_num': fansNum,
|
||||
'area_name': areaName,
|
||||
'area_value': areaValue,
|
||||
'tags': tags,
|
||||
'recent_record_id_v2': recentRecordIdV2,
|
||||
'record_num_v2': recordNumV2,
|
||||
'record_live_time': recordLiveTime,
|
||||
'area_name_v2': areaNameV2,
|
||||
'room_news': roomNews,
|
||||
'switch': sw1tch,
|
||||
'watch_icon': watchIcon,
|
||||
'text_small': textSmall,
|
||||
'room_cover': roomCover,
|
||||
'parent_area_id': parentAreaId,
|
||||
'area_id': areaId,
|
||||
};
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
class LiveDanmakuInfo {
|
||||
String message;
|
||||
int ttl, code;
|
||||
DanmakuInfoData data;
|
||||
LiveDanmakuInfo(
|
||||
{required this.code,
|
||||
required this.message,
|
||||
required this.ttl,
|
||||
required this.data});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LiveDanmakuInfo{code: $code, message: $message, ttl: $ttl, data: $data}';
|
||||
}
|
||||
|
||||
factory LiveDanmakuInfo.fromJson(dynamic json) {
|
||||
List<HostInfo> hostList = [];
|
||||
for (var host in json['data']['host_list']) {
|
||||
hostList.add(HostInfo(
|
||||
host: host['host'],
|
||||
port: host['port'],
|
||||
wssPort: host['wss_port'],
|
||||
wsPort: host['ws_port']));
|
||||
}
|
||||
return LiveDanmakuInfo(
|
||||
code: json['code'],
|
||||
message: json['message'],
|
||||
ttl: json['ttl'],
|
||||
data: DanmakuInfoData(
|
||||
group: json['data']['group'],
|
||||
businessId: json['data']['business_id'],
|
||||
ttl: json['data']['ttl'] ?? 0,
|
||||
refreshRate: json['data']['refresh_rate'],
|
||||
maxDelay: json['data']['max_delay'],
|
||||
token: json['data']['token'],
|
||||
hostList: hostList));
|
||||
}
|
||||
}
|
||||
|
||||
class DanmakuInfoData {
|
||||
String group;
|
||||
int businessId, ttl, refreshRate, maxDelay;
|
||||
String token;
|
||||
List<HostInfo> hostList;
|
||||
DanmakuInfoData(
|
||||
{required this.group,
|
||||
required this.businessId,
|
||||
required this.ttl,
|
||||
required this.refreshRate,
|
||||
required this.maxDelay,
|
||||
required this.token,
|
||||
required this.hostList});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DanmakuInfoData{group: $group, businessId: $businessId, ttl: $ttl, refreshRate: $refreshRate, maxDelay: $maxDelay, token: $token, hostList: $hostList}';
|
||||
}
|
||||
}
|
||||
|
||||
class HostInfo {
|
||||
String host;
|
||||
int port, wssPort, wsPort;
|
||||
HostInfo(
|
||||
{required this.host,
|
||||
required this.port,
|
||||
required this.wssPort,
|
||||
required this.wsPort});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'HostInfo{host: $host, port: $port, wssPort: $wssPort, wsPort: $wsPort}';
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
|
||||
class LiveItemModel {
|
||||
LiveItemModel({
|
||||
this.roomId,
|
||||
this.uid,
|
||||
this.title,
|
||||
this.uname,
|
||||
this.online,
|
||||
this.userCover,
|
||||
this.userCoverFlag,
|
||||
this.systemCover,
|
||||
this.cover,
|
||||
this.pic,
|
||||
this.link,
|
||||
this.face,
|
||||
this.parentId,
|
||||
this.parentName,
|
||||
this.areaId,
|
||||
this.areaName,
|
||||
this.sessionId,
|
||||
this.groupId,
|
||||
this.pkId,
|
||||
this.watchedShow,
|
||||
});
|
||||
|
||||
int? roomId;
|
||||
int? uid;
|
||||
String? title;
|
||||
String? uname;
|
||||
int? online;
|
||||
String? userCover;
|
||||
int? userCoverFlag;
|
||||
String? systemCover;
|
||||
String? cover;
|
||||
String? pic;
|
||||
String? link;
|
||||
String? face;
|
||||
int? parentId;
|
||||
String? parentName;
|
||||
int? areaId;
|
||||
String? areaName;
|
||||
String? sessionId;
|
||||
int? groupId;
|
||||
int? pkId;
|
||||
WatchedShow? watchedShow;
|
||||
|
||||
LiveItemModel.fromJson(Map<String, dynamic> json) {
|
||||
roomId = json['roomid'];
|
||||
uid = json['uid'];
|
||||
title = json['title'];
|
||||
uname = json['uname'];
|
||||
online = json['online'];
|
||||
userCover = json['user_cover'];
|
||||
userCoverFlag = json['user_cover_flag'];
|
||||
systemCover = json['system_cover'];
|
||||
cover = json['cover'];
|
||||
pic = json['cover'];
|
||||
link = json['link'];
|
||||
face = json['face'];
|
||||
parentId = json['parent_id'];
|
||||
parentName = json['parent_name'];
|
||||
areaId = json['area_id'];
|
||||
areaName = json['area_name'];
|
||||
sessionId = json['session_id'];
|
||||
groupId = json['group_id'];
|
||||
pkId = json['pk_id'];
|
||||
watchedShow = json['watched_show'];
|
||||
}
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
class RoomInfoModel {
|
||||
RoomInfoModel({
|
||||
this.roomId,
|
||||
this.liveStatus,
|
||||
this.liveTime,
|
||||
this.playurlInfo,
|
||||
});
|
||||
int? roomId;
|
||||
int? liveStatus;
|
||||
int? liveTime;
|
||||
PlayurlInfo? playurlInfo;
|
||||
bool? isPortrait;
|
||||
|
||||
RoomInfoModel.fromJson(Map<String, dynamic> json) {
|
||||
roomId = json['room_id'];
|
||||
liveStatus = json['live_status'];
|
||||
liveTime = json['live_time'];
|
||||
playurlInfo = json['playurl_info'] == null
|
||||
? null
|
||||
: PlayurlInfo.fromJson(json['playurl_info']);
|
||||
isPortrait = json['is_portrait'];
|
||||
}
|
||||
}
|
||||
|
||||
class PlayurlInfo {
|
||||
PlayurlInfo({
|
||||
this.playurl,
|
||||
});
|
||||
|
||||
Playurl? playurl;
|
||||
|
||||
PlayurlInfo.fromJson(Map<String, dynamic> json) {
|
||||
playurl =
|
||||
json['playurl'] == null ? null : Playurl.fromJson(json['playurl']);
|
||||
}
|
||||
}
|
||||
|
||||
class Playurl {
|
||||
Playurl({
|
||||
this.cid,
|
||||
this.gQnDesc,
|
||||
this.stream,
|
||||
});
|
||||
|
||||
int? cid;
|
||||
List<GQnDesc>? gQnDesc;
|
||||
List<Streams>? stream;
|
||||
|
||||
Playurl.fromJson(Map<String, dynamic> json) {
|
||||
cid = json['cid'];
|
||||
gQnDesc = (json['g_qn_desc'] as List?)
|
||||
?.map<GQnDesc>((e) => GQnDesc.fromJson(e))
|
||||
.toList();
|
||||
stream = (json['stream'] as List?)
|
||||
?.map<Streams>((e) => Streams.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
class GQnDesc {
|
||||
GQnDesc({
|
||||
this.qn,
|
||||
this.desc,
|
||||
this.hdrDesc,
|
||||
this.attrDesc,
|
||||
});
|
||||
|
||||
int? qn;
|
||||
String? desc;
|
||||
String? hdrDesc;
|
||||
String? attrDesc;
|
||||
|
||||
GQnDesc.fromJson(Map<String, dynamic> json) {
|
||||
qn = json['qn'];
|
||||
desc = json['desc'];
|
||||
hdrDesc = json['hedr_desc'];
|
||||
attrDesc = json['attr_desc'];
|
||||
}
|
||||
}
|
||||
|
||||
class Streams {
|
||||
Streams({
|
||||
this.protocolName,
|
||||
this.format,
|
||||
});
|
||||
|
||||
String? protocolName;
|
||||
List<FormatItem>? format;
|
||||
|
||||
Streams.fromJson(Map<String, dynamic> json) {
|
||||
protocolName = json['protocol_name'];
|
||||
format = (json['format'] as List?)
|
||||
?.map<FormatItem>((e) => FormatItem.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
class FormatItem {
|
||||
FormatItem({
|
||||
this.formatName,
|
||||
this.codec,
|
||||
});
|
||||
|
||||
String? formatName;
|
||||
List<CodecItem>? codec;
|
||||
|
||||
FormatItem.fromJson(Map<String, dynamic> json) {
|
||||
formatName = json['format_name'];
|
||||
codec = (json['codec'] as List?)
|
||||
?.map<CodecItem>((e) => CodecItem.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
class CodecItem {
|
||||
CodecItem({
|
||||
this.codecName,
|
||||
this.currentQn,
|
||||
this.acceptQn,
|
||||
this.baseUrl,
|
||||
this.urlInfo,
|
||||
this.hdrQn,
|
||||
this.dolbyType,
|
||||
this.attrName,
|
||||
});
|
||||
|
||||
String? codecName;
|
||||
int? currentQn;
|
||||
List? acceptQn;
|
||||
String? baseUrl;
|
||||
List<UrlInfoItem>? urlInfo;
|
||||
String? hdrQn;
|
||||
int? dolbyType;
|
||||
String? attrName;
|
||||
|
||||
CodecItem.fromJson(Map<String, dynamic> json) {
|
||||
codecName = json['codec_name'];
|
||||
currentQn = json['current_qn'];
|
||||
acceptQn = json['accept_qn'];
|
||||
baseUrl = json['base_url'];
|
||||
urlInfo = (json['url_info'] as List?)
|
||||
?.map<UrlInfoItem>((e) => UrlInfoItem.fromJson(e))
|
||||
.toList();
|
||||
hdrQn = json['hdr_n'];
|
||||
dolbyType = json['dolby_type'];
|
||||
attrName = json['attr_name'];
|
||||
}
|
||||
}
|
||||
|
||||
class UrlInfoItem {
|
||||
UrlInfoItem({
|
||||
this.host,
|
||||
this.extra,
|
||||
this.streamTtl,
|
||||
});
|
||||
|
||||
String? host;
|
||||
String? extra;
|
||||
int? streamTtl;
|
||||
|
||||
UrlInfoItem.fromJson(Map<String, dynamic> json) {
|
||||
host = json['host'];
|
||||
extra = json['extra'];
|
||||
streamTtl = json['stream_ttl'];
|
||||
}
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
|
||||
class RoomInfoH5Model {
|
||||
RoomInfoH5Model({
|
||||
this.roomInfo,
|
||||
this.anchorInfo,
|
||||
this.isRoomFeed,
|
||||
this.watchedShow,
|
||||
this.likeInfoV3,
|
||||
});
|
||||
|
||||
RoomInfo? roomInfo;
|
||||
AnchorInfo? anchorInfo;
|
||||
int? isRoomFeed;
|
||||
WatchedShow? watchedShow;
|
||||
LikeInfoV3? likeInfoV3;
|
||||
|
||||
RoomInfoH5Model.fromJson(Map<String, dynamic> json) {
|
||||
roomInfo =
|
||||
json['room_info'] == null ? null : RoomInfo.fromJson(json['room_info']);
|
||||
anchorInfo = json['anchor_info'] == null
|
||||
? null
|
||||
: AnchorInfo.fromJson(json['anchor_info']);
|
||||
isRoomFeed = json['is_room_feed'];
|
||||
watchedShow = json['watched_show'] == null
|
||||
? null
|
||||
: WatchedShow.fromJson(json['watched_show']);
|
||||
likeInfoV3 = json['like_info_v3'] == null
|
||||
? null
|
||||
: LikeInfoV3.fromJson(json['like_info_v3']);
|
||||
}
|
||||
}
|
||||
|
||||
class RoomInfo {
|
||||
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.background,
|
||||
this.appBackground,
|
||||
this.liveId,
|
||||
});
|
||||
|
||||
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? background;
|
||||
String? appBackground;
|
||||
String? liveId;
|
||||
|
||||
RoomInfo.fromJson(Map<String, dynamic> json) {
|
||||
uid = json['uid'];
|
||||
roomId = json['room_id'];
|
||||
title = json['title'];
|
||||
cover = json['cover'];
|
||||
description = json['description'];
|
||||
liveStatus = json['liveS_satus'];
|
||||
liveStartTime = json['live_start_time'];
|
||||
areaId = json['area_id'];
|
||||
areaName = json['area_name'];
|
||||
parentAreaId = json['parent_area_id'];
|
||||
parentAreaName = json['parent_area_name'];
|
||||
online = json['online'];
|
||||
background = json['background'];
|
||||
appBackground = json['app_background'];
|
||||
liveId = json['live_id'];
|
||||
}
|
||||
}
|
||||
|
||||
class AnchorInfo {
|
||||
AnchorInfo({
|
||||
this.baseInfo,
|
||||
// this.relationInfo,
|
||||
});
|
||||
|
||||
BaseInfo? baseInfo;
|
||||
// RelationInfo? relationInfo;
|
||||
|
||||
AnchorInfo.fromJson(Map<String, dynamic> json) {
|
||||
baseInfo =
|
||||
json['base_info'] == null ? null : BaseInfo.fromJson(json['base_info']);
|
||||
// relationInfo = json['relation_info'] == null
|
||||
// ? null
|
||||
// : RelationInfo.fromJson(json['relation_info']);
|
||||
}
|
||||
}
|
||||
|
||||
class BaseInfo {
|
||||
BaseInfo({
|
||||
this.uname,
|
||||
this.face,
|
||||
});
|
||||
|
||||
String? uname;
|
||||
String? face;
|
||||
|
||||
BaseInfo.fromJson(Map<String, dynamic> json) {
|
||||
uname = json['uname'];
|
||||
face = json['face'];
|
||||
}
|
||||
}
|
||||
|
||||
class RelationInfo {
|
||||
RelationInfo({this.attention});
|
||||
|
||||
int? attention;
|
||||
|
||||
RelationInfo.fromJson(Map<String, dynamic> json) {
|
||||
attention = json['attention'];
|
||||
}
|
||||
}
|
||||
|
||||
class LikeInfoV3 {
|
||||
LikeInfoV3({this.totalLikes});
|
||||
|
||||
int? totalLikes;
|
||||
|
||||
LikeInfoV3.fromJson(Map<String, dynamic> json) {
|
||||
totalLikes = json['total_likes'];
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_search/room.dart';
|
||||
import 'package:PiliPlus/models/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?,
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import 'package:PiliPlus/models/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>),
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import 'package:PiliPlus/models/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?,
|
||||
);
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_search/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>),
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import 'package:PiliPlus/models/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?,
|
||||
);
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
class LiveSearchUserItemModel {
|
||||
String? face;
|
||||
String? name;
|
||||
int? liveStatus;
|
||||
String? areaName;
|
||||
int? fansNum;
|
||||
List? roomTags;
|
||||
int? roomid;
|
||||
String? link;
|
||||
|
||||
LiveSearchUserItemModel({
|
||||
this.face,
|
||||
this.name,
|
||||
this.liveStatus,
|
||||
this.areaName,
|
||||
this.fansNum,
|
||||
this.roomTags,
|
||||
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?,
|
||||
roomTags: json['roomTags'],
|
||||
roomid: json['roomid'] as int?,
|
||||
link: json['link'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
class WatchedShow {
|
||||
int? num;
|
||||
String? textSmall;
|
||||
String? textLarge;
|
||||
String? icon;
|
||||
int? iconLocation;
|
||||
String? iconWeb;
|
||||
|
||||
WatchedShow({
|
||||
this.num,
|
||||
this.textSmall,
|
||||
this.textLarge,
|
||||
this.icon,
|
||||
this.iconLocation,
|
||||
this.iconWeb,
|
||||
});
|
||||
|
||||
factory WatchedShow.fromJson(Map<String, dynamic> json) => WatchedShow(
|
||||
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?,
|
||||
);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart';
|
||||
import 'package:PiliPlus/models/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(),
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
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'],
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class Badge {
|
||||
String? text;
|
||||
int? bgStyle;
|
||||
String? img;
|
||||
|
||||
Badge({this.text, this.bgStyle, this.img});
|
||||
|
||||
factory Badge.fromJson(Map<String, dynamic> json) => Badge(
|
||||
text: json['text'] as String?,
|
||||
bgStyle: json['bg_style'] as int?,
|
||||
img: json['img'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
class CntInfo {
|
||||
int? collect;
|
||||
int? play;
|
||||
int? thumbUp;
|
||||
int? thumbDown;
|
||||
int? share;
|
||||
int? reply;
|
||||
int? danmaku;
|
||||
int? coin;
|
||||
int? vt;
|
||||
int? playSwitch;
|
||||
String? viewText1;
|
||||
|
||||
CntInfo({
|
||||
this.collect,
|
||||
this.play,
|
||||
this.thumbUp,
|
||||
this.thumbDown,
|
||||
this.share,
|
||||
this.reply,
|
||||
this.danmaku,
|
||||
this.coin,
|
||||
this.vt,
|
||||
this.playSwitch,
|
||||
this.viewText1,
|
||||
});
|
||||
|
||||
factory CntInfo.fromJson(Map<String, dynamic> json) => CntInfo(
|
||||
collect: json['collect'] as int?,
|
||||
play: json['play'] as int?,
|
||||
thumbUp: json['thumb_up'] as int?,
|
||||
thumbDown: json['thumb_down'] as int?,
|
||||
share: json['share'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
vt: json['vt'] as int?,
|
||||
playSwitch: json['play_switch'] as int?,
|
||||
viewText1: json['view_text_1'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class Coin {
|
||||
int? maxNum;
|
||||
int? coinNumber;
|
||||
|
||||
Coin({this.maxNum, this.coinNumber});
|
||||
|
||||
factory Coin.fromJson(Map<String, dynamic> json) => Coin(
|
||||
maxNum: json['max_num'] as int?,
|
||||
coinNumber: json['coin_number'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
import 'package:PiliPlus/models/media_list/media_list.dart';
|
||||
|
||||
class MediaListData {
|
||||
List<MediaListItemModel>? mediaList;
|
||||
bool? hasMore;
|
||||
int? totalCount;
|
||||
String? nextStartKey;
|
||||
|
||||
MediaListData(
|
||||
{this.mediaList, this.hasMore, this.totalCount, this.nextStartKey});
|
||||
|
||||
factory MediaListData.fromJson(Map<String, dynamic> json) => MediaListData(
|
||||
mediaList: (json['media_list'] as List<dynamic>?)
|
||||
?.map((e) => MediaListItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
totalCount: json['total_count'] as int?,
|
||||
nextStartKey: json['next_start_key'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class Dimension {
|
||||
int? width;
|
||||
int? height;
|
||||
int? rotate;
|
||||
|
||||
Dimension({this.width, this.height, this.rotate});
|
||||
|
||||
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
|
||||
width: json['width'] as int?,
|
||||
height: json['height'] as int?,
|
||||
rotate: json['rotate'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
import 'package:PiliPlus/models/media_list/badge.dart';
|
||||
import 'package:PiliPlus/models/media_list/cnt_info.dart';
|
||||
import 'package:PiliPlus/models/media_list/coin.dart';
|
||||
import 'package:PiliPlus/models/media_list/ogv_info.dart';
|
||||
import 'package:PiliPlus/models/media_list/page.dart';
|
||||
import 'package:PiliPlus/models/media_list/rights.dart';
|
||||
import 'package:PiliPlus/models/media_list/upper.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
|
||||
class MediaListItemModel {
|
||||
int? get id => aid;
|
||||
int? aid;
|
||||
int? offset;
|
||||
int? index;
|
||||
String? intro;
|
||||
int? attr;
|
||||
int? tid;
|
||||
int? copyRight;
|
||||
CntInfo? cntInfo;
|
||||
String? cover;
|
||||
int? duration;
|
||||
int? pubtime;
|
||||
int? likeState;
|
||||
int? favState;
|
||||
int? page;
|
||||
List<Page>? pages;
|
||||
String? title;
|
||||
int? type;
|
||||
Upper? upper;
|
||||
String? link;
|
||||
String? bvid;
|
||||
String? shortLink;
|
||||
Rights? rights;
|
||||
dynamic elecInfo;
|
||||
Coin? coin;
|
||||
OgvInfo? ogvInfo;
|
||||
double? progressPercent;
|
||||
Badge? badge;
|
||||
bool? forbidFav;
|
||||
int? moreType;
|
||||
int? businessOid;
|
||||
int? cid;
|
||||
|
||||
MediaListItemModel({
|
||||
this.aid,
|
||||
this.offset,
|
||||
this.index,
|
||||
this.intro,
|
||||
this.attr,
|
||||
this.tid,
|
||||
this.copyRight,
|
||||
this.cntInfo,
|
||||
this.cover,
|
||||
this.duration,
|
||||
this.pubtime,
|
||||
this.likeState,
|
||||
this.favState,
|
||||
this.page,
|
||||
this.pages,
|
||||
this.title,
|
||||
this.type,
|
||||
this.upper,
|
||||
this.link,
|
||||
this.bvid,
|
||||
this.shortLink,
|
||||
this.rights,
|
||||
this.elecInfo,
|
||||
this.coin,
|
||||
this.ogvInfo,
|
||||
this.progressPercent,
|
||||
this.badge,
|
||||
this.forbidFav,
|
||||
this.moreType,
|
||||
this.businessOid,
|
||||
this.cid,
|
||||
});
|
||||
|
||||
MediaListItemModel.fromJson(Map<String, dynamic> json) {
|
||||
aid = json['id'] as int?;
|
||||
offset = json['offset'] as int?;
|
||||
index = json['index'] as int?;
|
||||
intro = json['intro'] as String?;
|
||||
attr = json['attr'] as int?;
|
||||
tid = json['tid'] as int?;
|
||||
copyRight = json['copy_right'] as int?;
|
||||
cntInfo =
|
||||
json['cnt_info'] == null ? null : CntInfo.fromJson(json['cnt_info']);
|
||||
cover = json['cover'] as String?;
|
||||
duration = json['duration'] as int?;
|
||||
pubtime = json['pubtime'] as int?;
|
||||
likeState = json['like_state'] as int?;
|
||||
favState = json['fav_state'] as int?;
|
||||
page = json['page'] as int?;
|
||||
pages = (json['pages'] as List?)?.map((e) => Page.fromJson(e)).toList();
|
||||
title = json['title'] as String?;
|
||||
type = json['type'] as int?;
|
||||
upper = json['upper'] == null ? null : Upper.fromJson(json['upper']);
|
||||
link = json['link'] as String?;
|
||||
bvid = json['bv_id'] as String?;
|
||||
shortLink = json['short_link'] as String?;
|
||||
rights = json['rights'] == null ? null : Rights.fromJson(json['rights']);
|
||||
elecInfo = json['elec_info'] as dynamic;
|
||||
coin = json['coin'] == null ? null : Coin.fromJson(json['coin']);
|
||||
ogvInfo =
|
||||
json['ogv_info'] == null ? null : OgvInfo.fromJson(json['ogv_info']);
|
||||
progressPercent = (json['progress_percent'] as num?)?.toDouble();
|
||||
badge = json['badge'] == null ? null : Badge.fromJson(json['badge']);
|
||||
forbidFav = json['forbid_fav'] as bool?;
|
||||
moreType = json['more_type'] as int?;
|
||||
businessOid = json['business_oid'] as int?;
|
||||
cid = pages.getOrNull((page ?? 1) - 1)?.id;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import 'package:PiliPlus/models/media_list/dimension.dart';
|
||||
|
||||
class OgvInfo {
|
||||
int? epid;
|
||||
int? seasonId;
|
||||
int? aid;
|
||||
int? cid;
|
||||
Dimension? dimension;
|
||||
|
||||
OgvInfo({this.epid, this.seasonId, this.aid, this.cid, this.dimension});
|
||||
|
||||
factory OgvInfo.fromJson(Map<String, dynamic> json) => OgvInfo(
|
||||
epid: json['epid'] as int?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
aid: json['aid'] as int?,
|
||||
cid: json['cid'] as int?,
|
||||
dimension: json['dimension'] == null
|
||||
? null
|
||||
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
import 'package:PiliPlus/models/media_list/dimension.dart';
|
||||
|
||||
class Page {
|
||||
int? id;
|
||||
String? title;
|
||||
String? intro;
|
||||
int? duration;
|
||||
String? link;
|
||||
int? page;
|
||||
String? from;
|
||||
Dimension? dimension;
|
||||
|
||||
Page({
|
||||
this.id,
|
||||
this.title,
|
||||
this.intro,
|
||||
this.duration,
|
||||
this.link,
|
||||
this.page,
|
||||
this.from,
|
||||
this.dimension,
|
||||
});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
id: json["id"],
|
||||
title: json["title"],
|
||||
intro: json["intro"],
|
||||
duration: json["duration"],
|
||||
link: json["link"],
|
||||
page: json["page"],
|
||||
from: json["from"],
|
||||
dimension: json["dimension"] == null
|
||||
? null
|
||||
: Dimension.fromJson(json["dimension"]),
|
||||
);
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
class Rights {
|
||||
int? bp;
|
||||
int? elec;
|
||||
int? download;
|
||||
int? movie;
|
||||
int? pay;
|
||||
int? ugcPay;
|
||||
int? hd5;
|
||||
int? noReprint;
|
||||
int? autoplay;
|
||||
int? noBackground;
|
||||
|
||||
Rights({
|
||||
this.bp,
|
||||
this.elec,
|
||||
this.download,
|
||||
this.movie,
|
||||
this.pay,
|
||||
this.ugcPay,
|
||||
this.hd5,
|
||||
this.noReprint,
|
||||
this.autoplay,
|
||||
this.noBackground,
|
||||
});
|
||||
|
||||
factory Rights.fromJson(Map<String, dynamic> json) => Rights(
|
||||
bp: json['bp'] as int?,
|
||||
elec: json['elec'] as int?,
|
||||
download: json['download'] as int?,
|
||||
movie: json['movie'] as int?,
|
||||
pay: json['pay'] as int?,
|
||||
ugcPay: json['ugc_pay'] as int?,
|
||||
hd5: json['hd5'] as int?,
|
||||
noReprint: json['no_reprint'] as int?,
|
||||
autoplay: json['autoplay'] as int?,
|
||||
noBackground: json['no_background'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
class Upper {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
int? followed;
|
||||
int? fans;
|
||||
int? vipType;
|
||||
int? vipStatue;
|
||||
int? vipDueDate;
|
||||
int? vipPayType;
|
||||
int? officialRole;
|
||||
String? officialTitle;
|
||||
String? officialDesc;
|
||||
String? displayName;
|
||||
|
||||
Upper({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.followed,
|
||||
this.fans,
|
||||
this.vipType,
|
||||
this.vipStatue,
|
||||
this.vipDueDate,
|
||||
this.vipPayType,
|
||||
this.officialRole,
|
||||
this.officialTitle,
|
||||
this.officialDesc,
|
||||
this.displayName,
|
||||
});
|
||||
|
||||
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
followed: json['followed'] as int?,
|
||||
fans: json['fans'] as int?,
|
||||
vipType: json['vip_type'] as int?,
|
||||
vipStatue: json['vip_statue'] as int?,
|
||||
vipDueDate: json['vip_due_date'] as int?,
|
||||
vipPayType: json['vip_pay_type'] as int?,
|
||||
officialRole: json['official_role'] as int?,
|
||||
officialTitle: json['official_title'] as String?,
|
||||
officialDesc: json['official_desc'] as String?,
|
||||
displayName: json['display_name'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
|
||||
class MemberArchiveDataModel {
|
||||
MemberArchiveDataModel({
|
||||
this.list,
|
||||
this.page,
|
||||
});
|
||||
|
||||
ArchiveListModel? list;
|
||||
Map? page;
|
||||
|
||||
MemberArchiveDataModel.fromJson(Map<String, dynamic> json) {
|
||||
list = ArchiveListModel.fromJson(json['list']);
|
||||
page = json['page'];
|
||||
}
|
||||
}
|
||||
|
||||
class ArchiveListModel {
|
||||
ArchiveListModel({
|
||||
this.tlist,
|
||||
this.vlist,
|
||||
});
|
||||
|
||||
Map<String, TListItemModel>? tlist;
|
||||
List<VListItemModel>? vlist;
|
||||
|
||||
ArchiveListModel.fromJson(Map<String, dynamic> json) {
|
||||
tlist = json['tlist'] != null
|
||||
? Map.from(json['tlist']).map((k, v) =>
|
||||
MapEntry<String, TListItemModel>(k, TListItemModel.fromJson(v)))
|
||||
: {};
|
||||
vlist = (json['vlist'] as List?)
|
||||
?.map<VListItemModel>((e) => VListItemModel.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
class TListItemModel {
|
||||
TListItemModel({
|
||||
this.tid,
|
||||
this.count,
|
||||
this.name,
|
||||
});
|
||||
|
||||
int? tid;
|
||||
int? count;
|
||||
String? name;
|
||||
|
||||
TListItemModel.fromJson(Map<String, dynamic> json) {
|
||||
tid = json['tid'];
|
||||
count = json['count'];
|
||||
name = json['name'];
|
||||
}
|
||||
}
|
||||
|
||||
class VListItemModel extends BaseVideoItemModel {
|
||||
int? comment;
|
||||
int? typeid;
|
||||
String? subtitle;
|
||||
String? copyright;
|
||||
int? review;
|
||||
bool? hideClick;
|
||||
bool? isChargingSrc;
|
||||
|
||||
VListItemModel.fromJson(Map<String, dynamic> json) {
|
||||
comment = json['comment'];
|
||||
typeid = json['typeid'];
|
||||
pic = json['pic'];
|
||||
subtitle = json['subtitle'];
|
||||
desc = json['description'];
|
||||
copyright = json['copyright'];
|
||||
title = json['title'];
|
||||
review = json['review'];
|
||||
pubdate = json['created'];
|
||||
if (json['length'] != null) duration = Utils.duration(json['length']);
|
||||
aid = json['aid'];
|
||||
bvid = json['bvid'];
|
||||
hideClick = json['hide_click'];
|
||||
isChargingSrc = json['is_charging_arc'];
|
||||
stat = VListStat.fromJson(json);
|
||||
owner = VListOwner.fromJson(json);
|
||||
}
|
||||
|
||||
// @override
|
||||
// int? cid = null;
|
||||
|
||||
// @override
|
||||
// String? rcmdReason = null;
|
||||
|
||||
// @override
|
||||
// String? goto;
|
||||
|
||||
// @override
|
||||
// bool isFollowed;
|
||||
|
||||
// @override
|
||||
// String? uri;
|
||||
}
|
||||
|
||||
class VListOwner extends BaseOwner {
|
||||
VListOwner.fromJson(Map<String, dynamic> json) {
|
||||
mid = json["mid"];
|
||||
name = json["author"];
|
||||
}
|
||||
}
|
||||
|
||||
class VListStat extends BaseStat {
|
||||
VListStat.fromJson(Map<String, dynamic> json) {
|
||||
view = json["play"];
|
||||
danmu = json['video_review'];
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
|
||||
class FavNoteModel with MultiSelectData {
|
||||
FavNoteModel({
|
||||
this.webUrl,
|
||||
this.title,
|
||||
this.summary,
|
||||
this.message,
|
||||
this.pic,
|
||||
this.cvid,
|
||||
this.noteId,
|
||||
});
|
||||
|
||||
String? webUrl;
|
||||
String? title;
|
||||
String? summary;
|
||||
String? message;
|
||||
String? pic;
|
||||
dynamic cvid;
|
||||
dynamic noteId;
|
||||
|
||||
FavNoteModel.fromJson(Map json) {
|
||||
webUrl = json['web_url'];
|
||||
title = json['title'];
|
||||
summary = json['summary'];
|
||||
message = json['message'];
|
||||
pic = json['arc']?['pic'];
|
||||
cvid = json['cvid'];
|
||||
noteId = json['note_id'];
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,6 @@ class MemberCoinsDataModel extends HotVideoItemModel {
|
||||
int? coins;
|
||||
int? time;
|
||||
String? resourceType;
|
||||
// int? get view => stat.view;
|
||||
// int? get danmaku => stat.danmu;
|
||||
|
||||
MemberCoinsDataModel.fromJson(Map<String, dynamic> json)
|
||||
: super.fromJson(json) {
|
||||
@@ -15,15 +13,5 @@ class MemberCoinsDataModel extends HotVideoItemModel {
|
||||
time = json['time'];
|
||||
resourceType = json['resource_type'];
|
||||
redirectUrl = json['redirect_url'];
|
||||
// view = json['stat']['view'];
|
||||
// danmaku = json['stat']['danmaku'];
|
||||
}
|
||||
// @override
|
||||
// String? goto;
|
||||
// @override
|
||||
// bool isFollowed;
|
||||
// @override
|
||||
// String? rcmdReason;
|
||||
// @override
|
||||
// String? uri;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
|
||||
|
||||
class MemberInfoModel {
|
||||
MemberInfoModel({
|
||||
@@ -35,7 +35,7 @@ class MemberInfoModel {
|
||||
name = json['name'];
|
||||
sex = json['sex'];
|
||||
face = json['face'];
|
||||
sign = json['sign'] == '' ? '该用户还没有签名' : json['sign'].replaceAll('\n', '');
|
||||
sign = json['sign'];
|
||||
level = json['level'];
|
||||
isFollowed = json['is_followed'];
|
||||
topPhoto = json['top_photo'];
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
class MemberSeasonsDataModel {
|
||||
MemberSeasonsDataModel({
|
||||
this.page,
|
||||
this.seasonsList,
|
||||
});
|
||||
|
||||
Map? page;
|
||||
List<MemberSeasonsList>? seasonsList;
|
||||
|
||||
MemberSeasonsDataModel.fromJson(Map<String, dynamic> json) {
|
||||
page = json['page'];
|
||||
seasonsList = (json['seasons_list'] as List?)
|
||||
?.map<MemberSeasonsList>((e) => MemberSeasonsList.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
class MemberSeasonsList {
|
||||
MemberSeasonsList({
|
||||
this.archives,
|
||||
this.meta,
|
||||
this.recentAids,
|
||||
this.page,
|
||||
});
|
||||
|
||||
List<MemberArchiveItem>? archives;
|
||||
MamberMeta? meta;
|
||||
List? recentAids;
|
||||
Map? page;
|
||||
|
||||
MemberSeasonsList.fromJson(Map<String, dynamic> json) {
|
||||
archives = (json['archives'] as List?)
|
||||
?.map<MemberArchiveItem>((e) => MemberArchiveItem.fromJson(e))
|
||||
.toList();
|
||||
meta = MamberMeta.fromJson(json['meta']);
|
||||
page = json['page'];
|
||||
}
|
||||
}
|
||||
|
||||
class MemberArchiveItem {
|
||||
MemberArchiveItem({
|
||||
this.aid,
|
||||
this.bvid,
|
||||
this.ctime,
|
||||
this.duration,
|
||||
this.pic,
|
||||
this.cover,
|
||||
this.pubdate,
|
||||
this.view,
|
||||
this.title,
|
||||
});
|
||||
|
||||
int? aid;
|
||||
String? bvid;
|
||||
int? ctime;
|
||||
int? duration;
|
||||
String? pic;
|
||||
String? cover;
|
||||
int? pubdate;
|
||||
int? view;
|
||||
String? title;
|
||||
|
||||
MemberArchiveItem.fromJson(Map<String, dynamic> json) {
|
||||
aid = json['aid'];
|
||||
bvid = json['bvid'];
|
||||
ctime = json['ctime'];
|
||||
duration = json['duration'];
|
||||
pic = json['pic'];
|
||||
cover = json['pic'];
|
||||
pubdate = json['pubdate'];
|
||||
view = json['stat']['view'];
|
||||
title = json['title'];
|
||||
}
|
||||
}
|
||||
|
||||
class MamberMeta {
|
||||
MamberMeta({
|
||||
this.cover,
|
||||
this.description,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.ptime,
|
||||
this.seasonId,
|
||||
this.total,
|
||||
});
|
||||
|
||||
String? cover;
|
||||
String? description;
|
||||
int? mid;
|
||||
String? name;
|
||||
int? ptime;
|
||||
int? seasonId;
|
||||
int? total;
|
||||
|
||||
MamberMeta.fromJson(Map<String, dynamic> json) {
|
||||
cover = json['cover'];
|
||||
description = json['description'];
|
||||
mid = json['mid'];
|
||||
name = json['name'];
|
||||
ptime = json['ptime'];
|
||||
seasonId = json['season_id'];
|
||||
total = json['total'];
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
import 'package:PiliPlus/models/member_ss/stat.dart';
|
||||
|
||||
class MemberSsArchive {
|
||||
int? aid;
|
||||
String? bvid;
|
||||
int? ctime;
|
||||
int? duration;
|
||||
bool? enableVt;
|
||||
bool? interactiveVideo;
|
||||
String? pic;
|
||||
int? playbackPosition;
|
||||
int? pubdate;
|
||||
MemberSsStat? stat;
|
||||
int? state;
|
||||
String? title;
|
||||
int? ugcPay;
|
||||
String? vtDisplay;
|
||||
int? isLessonVideo;
|
||||
MemberSsArchive({
|
||||
this.aid,
|
||||
this.bvid,
|
||||
this.ctime,
|
||||
this.duration,
|
||||
this.enableVt,
|
||||
this.interactiveVideo,
|
||||
this.pic,
|
||||
this.playbackPosition,
|
||||
this.pubdate,
|
||||
this.stat,
|
||||
this.state,
|
||||
this.title,
|
||||
this.ugcPay,
|
||||
this.vtDisplay,
|
||||
this.isLessonVideo,
|
||||
});
|
||||
|
||||
factory MemberSsArchive.fromJson(Map<String, dynamic> json) =>
|
||||
MemberSsArchive(
|
||||
aid: json["aid"],
|
||||
bvid: json["bvid"],
|
||||
ctime: json["ctime"],
|
||||
duration: json["duration"],
|
||||
enableVt: json["enable_vt"],
|
||||
interactiveVideo: json["interactive_video"],
|
||||
pic: json["pic"],
|
||||
playbackPosition: json["playback_position"],
|
||||
pubdate: json["pubdate"],
|
||||
stat: json["stat"] == null ? null : MemberSsStat.fromJson(json["stat"]),
|
||||
state: json["state"],
|
||||
title: json["title"],
|
||||
ugcPay: json["ugc_pay"],
|
||||
vtDisplay: json["vt_display"],
|
||||
isLessonVideo: json["is_lesson_video"],
|
||||
);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import 'package:PiliPlus/models/member_ss/page.dart';
|
||||
import 'package:PiliPlus/models/member_ss/season.dart';
|
||||
|
||||
class MemberSsData {
|
||||
MemberSsPage? page;
|
||||
List<MemberSsModel>? seasonsList;
|
||||
List<MemberSsModel>? seriesList;
|
||||
|
||||
MemberSsData({
|
||||
this.page,
|
||||
this.seasonsList,
|
||||
this.seriesList,
|
||||
});
|
||||
|
||||
factory MemberSsData.fromJson(Map<String, dynamic> json) => MemberSsData(
|
||||
page: json["page"] == null ? null : MemberSsPage.fromJson(json["page"]),
|
||||
seasonsList: json["seasons_list"] == null
|
||||
? null
|
||||
: List<MemberSsModel>.from(
|
||||
json["seasons_list"]!.map((x) => MemberSsModel.fromJson(x))),
|
||||
seriesList: json["series_list"] == null
|
||||
? null
|
||||
: List<MemberSsModel>.from(
|
||||
json["series_list"]!.map((x) => MemberSsModel.fromJson(x))),
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
class MemberSsPage {
|
||||
int? pageNum;
|
||||
int? pageSize;
|
||||
int? total;
|
||||
|
||||
MemberSsPage({
|
||||
this.pageNum,
|
||||
this.pageSize,
|
||||
this.total,
|
||||
});
|
||||
|
||||
factory MemberSsPage.fromJson(Map<String, dynamic> json) => MemberSsPage(
|
||||
pageNum: json["page_num"],
|
||||
pageSize: json["page_size"],
|
||||
total: json["total"],
|
||||
);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import 'package:PiliPlus/models/member_ss/archive.dart';
|
||||
import 'package:PiliPlus/models/member_ss/stat.dart';
|
||||
|
||||
class MemberSsModel {
|
||||
List<MemberSsArchive>? archives;
|
||||
MemberSsMeta? meta;
|
||||
List<int>? recentAids;
|
||||
|
||||
MemberSsModel({
|
||||
this.archives,
|
||||
this.meta,
|
||||
this.recentAids,
|
||||
});
|
||||
|
||||
factory MemberSsModel.fromJson(Map<String, dynamic> json) => MemberSsModel(
|
||||
archives: json["archives"] == null
|
||||
? null
|
||||
: List<MemberSsArchive>.from(
|
||||
json["archives"]!.map((x) => MemberSsArchive.fromJson(x))),
|
||||
meta: json["meta"] == null ? null : MemberSsMeta.fromJson(json["meta"]),
|
||||
recentAids: json["recent_aids"] == null
|
||||
? null
|
||||
: List<int>.from(json["recent_aids"]!.map((x) => x)),
|
||||
);
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
class MemberSsStat {
|
||||
int? view;
|
||||
int? vt;
|
||||
|
||||
MemberSsStat({
|
||||
this.view,
|
||||
this.vt,
|
||||
});
|
||||
|
||||
factory MemberSsStat.fromJson(Map<String, dynamic> json) => MemberSsStat(
|
||||
view: json["view"],
|
||||
vt: json["vt"],
|
||||
);
|
||||
}
|
||||
|
||||
class MemberSsMeta {
|
||||
int? category;
|
||||
String? cover;
|
||||
String? description;
|
||||
int? mid;
|
||||
String? name;
|
||||
int? ptime;
|
||||
int? total;
|
||||
dynamic seasonId;
|
||||
dynamic seriesId;
|
||||
|
||||
MemberSsMeta({
|
||||
this.category,
|
||||
this.cover,
|
||||
this.description,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.ptime,
|
||||
this.total,
|
||||
this.seasonId,
|
||||
this.seriesId,
|
||||
});
|
||||
|
||||
factory MemberSsMeta.fromJson(Map<String, dynamic> json) => MemberSsMeta(
|
||||
category: json["category"],
|
||||
cover: json["cover"],
|
||||
description: json["description"],
|
||||
mid: json["mid"],
|
||||
name: json["name"],
|
||||
ptime: json["ptime"],
|
||||
total: json["total"],
|
||||
seasonId: json["season_id"],
|
||||
seriesId: json["series_id"],
|
||||
);
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class HotVideoItemModel extends BaseRecVideoItemModel with MultiSelectData {
|
||||
tid = json["tid"];
|
||||
tname = json["tname"];
|
||||
copyright = json["copyright"];
|
||||
pic = json["pic"];
|
||||
cover = json["pic"];
|
||||
title = json["title"];
|
||||
pubdate = json["pubdate"];
|
||||
ctime = json["ctime"];
|
||||
|
||||
@@ -8,7 +8,7 @@ abstract class BaseRecVideoItemModel extends BaseVideoItemModel {
|
||||
|
||||
// app推荐专属
|
||||
int? param;
|
||||
String? bangumiBadge;
|
||||
String? pgcBadge;
|
||||
}
|
||||
|
||||
class RecVideoItemModel extends BaseRecVideoItemModel {
|
||||
@@ -18,7 +18,7 @@ class RecVideoItemModel extends BaseRecVideoItemModel {
|
||||
cid = json["cid"];
|
||||
goto = json["goto"];
|
||||
uri = json["uri"];
|
||||
pic = json["pic"];
|
||||
cover = json["pic"];
|
||||
title = json["title"];
|
||||
duration = json["duration"];
|
||||
pubdate = json["pubdate"];
|
||||
|
||||
@@ -4,7 +4,7 @@ abstract class BaseSimpleVideoItemModel {
|
||||
late String title;
|
||||
String? bvid;
|
||||
int? cid;
|
||||
String? pic;
|
||||
String? cover;
|
||||
int duration = -1;
|
||||
late BaseOwner owner;
|
||||
late BaseStat stat;
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
class AccountListModel {
|
||||
AccountListModel({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.sex,
|
||||
this.face,
|
||||
this.sign,
|
||||
this.rank,
|
||||
this.level,
|
||||
this.silence,
|
||||
this.vip,
|
||||
this.pendant,
|
||||
this.nameplate,
|
||||
this.official,
|
||||
this.birthday,
|
||||
this.isFakeAccount,
|
||||
this.isDeleted,
|
||||
this.inRegAudit,
|
||||
this.faceNft,
|
||||
this.faceNftNew,
|
||||
this.isSeniorMember,
|
||||
this.digitalId,
|
||||
this.digitalType,
|
||||
this.attestation,
|
||||
this.expertInfo,
|
||||
this.honours,
|
||||
});
|
||||
|
||||
int? mid;
|
||||
String? name;
|
||||
String? sex;
|
||||
String? face;
|
||||
String? sign;
|
||||
int? rank;
|
||||
int? level;
|
||||
int? silence;
|
||||
Map? vip;
|
||||
Map? pendant;
|
||||
Map? nameplate;
|
||||
Map? official;
|
||||
int? birthday;
|
||||
int? isFakeAccount;
|
||||
int? isDeleted;
|
||||
int? inRegAudit;
|
||||
int? faceNft;
|
||||
int? faceNftNew;
|
||||
int? isSeniorMember;
|
||||
String? digitalId;
|
||||
int? digitalType;
|
||||
Map? attestation;
|
||||
Map? expertInfo;
|
||||
Map? honours;
|
||||
|
||||
AccountListModel.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
name = json['name'] ?? '';
|
||||
sex = json['sex'];
|
||||
face = json['face'] ?? json['pic_url'];
|
||||
sign = json['sign'];
|
||||
rank = json['rank'];
|
||||
level = json['level'];
|
||||
silence = json['silence'];
|
||||
vip = json['vip'];
|
||||
pendant = json['pendant'];
|
||||
nameplate = json['nameplate'];
|
||||
official = json['official'];
|
||||
birthday = json['birthday'];
|
||||
isFakeAccount = json['is_fake_account'];
|
||||
isDeleted = json['is_deleted'];
|
||||
inRegAudit = json['in_reg_audit'];
|
||||
faceNft = json['face_nft'];
|
||||
faceNftNew = json['face_nft_new'];
|
||||
isSeniorMember = json['is_senior_member'];
|
||||
digitalId = json['digital_id'];
|
||||
digitalType = json['digital_type'];
|
||||
attestation = json['attestation'];
|
||||
expertInfo = json['expert_info'];
|
||||
honours = json['honours'];
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class ImUserInfosData {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? sex;
|
||||
String? face;
|
||||
String? sign;
|
||||
int? rank;
|
||||
int? level;
|
||||
int? silence;
|
||||
Vip? vip;
|
||||
Pendant? pendant;
|
||||
BaseOfficialVerify? official;
|
||||
int? birthday;
|
||||
int? isFakeAccount;
|
||||
int? isDeleted;
|
||||
int? inRegAudit;
|
||||
int? faceNft;
|
||||
int? faceNftNew;
|
||||
int? isSeniorMember;
|
||||
String? digitalId;
|
||||
int? digitalType;
|
||||
|
||||
ImUserInfosData({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.sex,
|
||||
this.face,
|
||||
this.sign,
|
||||
this.rank,
|
||||
this.level,
|
||||
this.silence,
|
||||
this.vip,
|
||||
this.pendant,
|
||||
this.official,
|
||||
this.birthday,
|
||||
this.isFakeAccount,
|
||||
this.isDeleted,
|
||||
this.inRegAudit,
|
||||
this.faceNft,
|
||||
this.faceNftNew,
|
||||
this.isSeniorMember,
|
||||
this.digitalId,
|
||||
this.digitalType,
|
||||
});
|
||||
|
||||
factory ImUserInfosData.fromJson(Map<String, dynamic> json) =>
|
||||
ImUserInfosData(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
sex: json['sex'] as String?,
|
||||
face: json['face'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
rank: json['rank'] as int?,
|
||||
level: json['level'] as int?,
|
||||
silence: json['silence'] as int?,
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
official: json['official'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official'] as Map<String, dynamic>),
|
||||
birthday: json['birthday'] as int?,
|
||||
isFakeAccount: json['is_fake_account'] as int?,
|
||||
isDeleted: json['is_deleted'] as int?,
|
||||
inRegAudit: json['in_reg_audit'] as int?,
|
||||
faceNft: json['face_nft'] as int?,
|
||||
faceNftNew: json['face_nft_new'] as int?,
|
||||
isSeniorMember: json['is_senior_member'] as int?,
|
||||
digitalId: json['digital_id'] as String?,
|
||||
digitalType: json['digital_type'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class UidSetting {
|
||||
int? id;
|
||||
int? setting;
|
||||
|
||||
UidSetting({this.id, this.setting});
|
||||
|
||||
factory UidSetting.fromJson(Map<String, dynamic> json) => UidSetting(
|
||||
id: json['id'] as int?,
|
||||
setting: json['setting'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'setting': setting,
|
||||
};
|
||||
}
|
||||
@@ -1,222 +0,0 @@
|
||||
class MsgFeedAtMe {
|
||||
Cursor? cursor;
|
||||
List<AtMeItems>? items;
|
||||
|
||||
MsgFeedAtMe({cursor, items});
|
||||
|
||||
MsgFeedAtMe.fromJson(Map<String, dynamic> json) {
|
||||
cursor = json['cursor'] != null ? Cursor.fromJson(json['cursor']) : null;
|
||||
if (json['items'] != null) {
|
||||
items = <AtMeItems>[];
|
||||
json['items'].forEach((v) {
|
||||
items!.add(AtMeItems.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['cursor'] = cursor?.toJson();
|
||||
data['items'] = items?.map((v) => v.toJson()).toList();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Cursor {
|
||||
bool? isEnd;
|
||||
int? id;
|
||||
int? time;
|
||||
|
||||
Cursor({isEnd, id, time});
|
||||
|
||||
Cursor.fromJson(Map<String, dynamic> json) {
|
||||
isEnd = json['is_end'];
|
||||
id = json['id'];
|
||||
time = json['time'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['is_end'] = isEnd;
|
||||
data['id'] = id;
|
||||
data['time'] = time;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AtMeItems {
|
||||
int? id;
|
||||
User? user;
|
||||
Item? item;
|
||||
int? atTime;
|
||||
|
||||
AtMeItems({id, user, item, atTime});
|
||||
|
||||
AtMeItems.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
user = json['user'] != null ? User.fromJson(json['user']) : null;
|
||||
item = json['item'] != null ? Item.fromJson(json['item']) : null;
|
||||
atTime = json['at_time'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['user'] = user?.toJson();
|
||||
data['item'] = item?.toJson();
|
||||
data['at_time'] = atTime;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class User {
|
||||
int? mid;
|
||||
int? fans;
|
||||
String? nickname;
|
||||
String? avatar;
|
||||
String? midLink;
|
||||
bool? follow;
|
||||
|
||||
User(
|
||||
{this.mid,
|
||||
this.fans,
|
||||
this.nickname,
|
||||
this.avatar,
|
||||
this.midLink,
|
||||
this.follow});
|
||||
|
||||
User.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
fans = json['fans'];
|
||||
nickname = json['nickname'];
|
||||
avatar = json['avatar'];
|
||||
midLink = json['mid_link'];
|
||||
follow = json['follow'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['mid'] = mid;
|
||||
data['fans'] = fans;
|
||||
data['nickname'] = nickname;
|
||||
data['avatar'] = avatar;
|
||||
data['mid_link'] = midLink;
|
||||
data['follow'] = follow;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Item {
|
||||
String? type;
|
||||
String? business;
|
||||
int? businessId;
|
||||
String? title;
|
||||
String? image;
|
||||
String? uri;
|
||||
int? subjectId;
|
||||
int? rootId;
|
||||
int? targetId;
|
||||
int? sourceId;
|
||||
String? sourceContent;
|
||||
String? nativeUri;
|
||||
List<AtDetails>? atDetails;
|
||||
List? topicDetails;
|
||||
bool? hideReplyButton;
|
||||
|
||||
Item(
|
||||
{this.type,
|
||||
this.business,
|
||||
this.businessId,
|
||||
this.title,
|
||||
this.image,
|
||||
this.uri,
|
||||
this.subjectId,
|
||||
this.rootId,
|
||||
this.targetId,
|
||||
this.sourceId,
|
||||
this.sourceContent,
|
||||
this.nativeUri,
|
||||
this.atDetails,
|
||||
this.topicDetails,
|
||||
this.hideReplyButton});
|
||||
|
||||
Item.fromJson(Map<String, dynamic> json) {
|
||||
type = json['type'];
|
||||
business = json['business'];
|
||||
businessId = json['business_id'];
|
||||
title = json['title'];
|
||||
image = json['image'];
|
||||
uri = json['uri'];
|
||||
subjectId = json['subject_id'];
|
||||
rootId = json['root_id'];
|
||||
targetId = json['target_id'];
|
||||
sourceId = json['source_id'];
|
||||
sourceContent = json['source_content'];
|
||||
nativeUri = json['native_uri'];
|
||||
if (json['at_details'] != null) {
|
||||
atDetails = <AtDetails>[];
|
||||
json['at_details'].forEach((v) {
|
||||
atDetails!.add(AtDetails.fromJson(v));
|
||||
});
|
||||
}
|
||||
topicDetails = json['topic_details'];
|
||||
hideReplyButton = json['hide_reply_button'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['type'] = type;
|
||||
data['business'] = business;
|
||||
data['business_id'] = businessId;
|
||||
data['title'] = title;
|
||||
data['image'] = image;
|
||||
data['uri'] = uri;
|
||||
data['subject_id'] = subjectId;
|
||||
data['root_id'] = rootId;
|
||||
data['target_id'] = targetId;
|
||||
data['source_id'] = sourceId;
|
||||
data['source_content'] = sourceContent;
|
||||
data['native_uri'] = nativeUri;
|
||||
data['at_details'] = atDetails?.map((v) => v.toJson()).toList();
|
||||
data['topic_details'] = topicDetails?.map((v) => v.toJson()).toList();
|
||||
data['hide_reply_button'] = hideReplyButton;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AtDetails {
|
||||
int? mid;
|
||||
int? fans;
|
||||
String? nickname;
|
||||
String? avatar;
|
||||
String? midLink;
|
||||
bool? follow;
|
||||
|
||||
AtDetails(
|
||||
{this.mid,
|
||||
this.fans,
|
||||
this.nickname,
|
||||
this.avatar,
|
||||
this.midLink,
|
||||
this.follow});
|
||||
|
||||
AtDetails.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
fans = json['fans'];
|
||||
nickname = json['nickname'];
|
||||
avatar = json['avatar'];
|
||||
midLink = json['mid_link'];
|
||||
follow = json['follow'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['mid'] = mid;
|
||||
data['fans'] = fans;
|
||||
data['nickname'] = nickname;
|
||||
data['avatar'] = avatar;
|
||||
data['mid_link'] = midLink;
|
||||
data['follow'] = follow;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -1,224 +0,0 @@
|
||||
class MsgFeedLikeMe {
|
||||
Latest? latest;
|
||||
Total? total;
|
||||
|
||||
MsgFeedLikeMe({latest, total});
|
||||
|
||||
MsgFeedLikeMe.fromJson(Map<String, dynamic> json) {
|
||||
latest = json['latest'] != null ? Latest.fromJson(json['latest']) : null;
|
||||
total = json['total'] != null ? Total.fromJson(json['total']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['latest'] = latest?.toJson();
|
||||
data['total'] = total?.toJson();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Latest {
|
||||
List<LikeMeItems>? items;
|
||||
int? lastViewAt;
|
||||
|
||||
Latest({items, lastViewAt});
|
||||
|
||||
Latest.fromJson(Map<String, dynamic> json) {
|
||||
if (json['items'] != null) {
|
||||
items = <LikeMeItems>[];
|
||||
json['items'].forEach((v) {
|
||||
items!.add(LikeMeItems.fromJson(v));
|
||||
});
|
||||
}
|
||||
lastViewAt = json['last_view_at'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['items'] = items?.map((v) => v.toJson()).toList();
|
||||
data['last_view_at'] = lastViewAt;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LikeMeItems {
|
||||
int? id;
|
||||
List<Users>? users;
|
||||
Item? item;
|
||||
int? counts;
|
||||
int? likeTime;
|
||||
int? noticeState;
|
||||
|
||||
LikeMeItems({id, users, item, counts, likeTime, noticeState});
|
||||
|
||||
LikeMeItems.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
if (json['users'] != null) {
|
||||
users = <Users>[];
|
||||
json['users'].forEach((v) {
|
||||
users!.add(Users.fromJson(v));
|
||||
});
|
||||
}
|
||||
item = json['item'] != null ? Item.fromJson(json['item']) : null;
|
||||
counts = json['counts'];
|
||||
likeTime = json['like_time'];
|
||||
noticeState = json['notice_state'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['users'] = users?.map((v) => v.toJson()).toList();
|
||||
data['item'] = item?.toJson();
|
||||
data['counts'] = counts;
|
||||
data['like_time'] = likeTime;
|
||||
data['notice_state'] = noticeState;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Users {
|
||||
int? mid;
|
||||
int? fans;
|
||||
String? nickname;
|
||||
String? avatar;
|
||||
String? midLink;
|
||||
bool? follow;
|
||||
|
||||
Users({mid, fans, nickname, avatar, midLink, follow});
|
||||
|
||||
Users.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
fans = json['fans'];
|
||||
nickname = json['nickname'];
|
||||
avatar = json['avatar'];
|
||||
midLink = json['mid_link'];
|
||||
follow = json['follow'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['mid'] = mid;
|
||||
data['fans'] = fans;
|
||||
data['nickname'] = nickname;
|
||||
data['avatar'] = avatar;
|
||||
data['mid_link'] = midLink;
|
||||
data['follow'] = follow;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Item {
|
||||
int? itemId;
|
||||
int? pid;
|
||||
String? type;
|
||||
String? business;
|
||||
int? businessId;
|
||||
int? replyBusinessId;
|
||||
int? likeBusinessId;
|
||||
String? title;
|
||||
String? desc;
|
||||
String? image;
|
||||
String? uri;
|
||||
String? detailName;
|
||||
String? nativeUri;
|
||||
int? ctime;
|
||||
|
||||
Item(
|
||||
{itemId,
|
||||
pid,
|
||||
type,
|
||||
business,
|
||||
businessId,
|
||||
replyBusinessId,
|
||||
likeBusinessId,
|
||||
title,
|
||||
desc,
|
||||
image,
|
||||
uri,
|
||||
detailName,
|
||||
nativeUri,
|
||||
ctime});
|
||||
|
||||
Item.fromJson(Map<String, dynamic> json) {
|
||||
itemId = json['item_id'];
|
||||
pid = json['pid'];
|
||||
type = json['type'];
|
||||
business = json['business'];
|
||||
businessId = json['business_id'];
|
||||
replyBusinessId = json['reply_business_id'];
|
||||
likeBusinessId = json['like_business_id'];
|
||||
title = json['title'];
|
||||
desc = json['desc'];
|
||||
image = json['image'];
|
||||
uri = json['uri'];
|
||||
detailName = json['detail_name'];
|
||||
nativeUri = json['native_uri'];
|
||||
ctime = json['ctime'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['item_id'] = itemId;
|
||||
data['pid'] = pid;
|
||||
data['type'] = type;
|
||||
data['business'] = business;
|
||||
data['business_id'] = businessId;
|
||||
data['reply_business_id'] = replyBusinessId;
|
||||
data['like_business_id'] = likeBusinessId;
|
||||
data['title'] = title;
|
||||
data['desc'] = desc;
|
||||
data['image'] = image;
|
||||
data['uri'] = uri;
|
||||
data['detail_name'] = detailName;
|
||||
data['native_uri'] = nativeUri;
|
||||
data['ctime'] = ctime;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Total {
|
||||
Cursor? cursor;
|
||||
List<LikeMeItems>? items;
|
||||
|
||||
Total({cursor, items});
|
||||
|
||||
Total.fromJson(Map<String, dynamic> json) {
|
||||
cursor = json['cursor'] != null ? Cursor.fromJson(json['cursor']) : null;
|
||||
if (json['items'] != null) {
|
||||
items = <LikeMeItems>[];
|
||||
json['items'].forEach((v) {
|
||||
items!.add(LikeMeItems.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['cursor'] = cursor?.toJson();
|
||||
data['items'] = items?.map((v) => v.toJson()).toList();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Cursor {
|
||||
bool? isEnd;
|
||||
int? id;
|
||||
int? time;
|
||||
|
||||
Cursor({isEnd, id, time});
|
||||
|
||||
Cursor.fromJson(Map<String, dynamic> json) {
|
||||
isEnd = json['is_end'];
|
||||
id = json['id'];
|
||||
time = json['time'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['is_end'] = isEnd;
|
||||
data['id'] = id;
|
||||
data['time'] = time;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -1,274 +0,0 @@
|
||||
class MsgFeedReplyMe {
|
||||
Cursor? cursor;
|
||||
List<ReplyMeItems>? items;
|
||||
int? lastViewAt;
|
||||
|
||||
MsgFeedReplyMe({this.cursor, this.items, this.lastViewAt});
|
||||
|
||||
MsgFeedReplyMe.fromJson(Map<String, dynamic> json) {
|
||||
cursor = json['cursor'] != null ? Cursor.fromJson(json['cursor']) : null;
|
||||
if (json['items'] != null) {
|
||||
items = <ReplyMeItems>[];
|
||||
json['items'].forEach((v) {
|
||||
items!.add(ReplyMeItems.fromJson(v));
|
||||
});
|
||||
}
|
||||
lastViewAt = json['last_view_at'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['cursor'] = cursor?.toJson();
|
||||
data['items'] = items?.map((v) => v.toJson()).toList();
|
||||
data['last_view_at'] = lastViewAt;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Cursor {
|
||||
bool? isEnd;
|
||||
int? id;
|
||||
int? time;
|
||||
|
||||
Cursor({this.isEnd, this.id, this.time});
|
||||
|
||||
Cursor.fromJson(Map<String, dynamic> json) {
|
||||
isEnd = json['is_end'];
|
||||
id = json['id'];
|
||||
time = json['time'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['is_end'] = isEnd;
|
||||
data['id'] = id;
|
||||
data['time'] = time;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ReplyMeItems {
|
||||
int? id;
|
||||
User? user;
|
||||
Item? item;
|
||||
int? counts;
|
||||
int? isMulti;
|
||||
int? replyTime;
|
||||
|
||||
ReplyMeItems({
|
||||
this.id,
|
||||
this.user,
|
||||
this.item,
|
||||
this.counts,
|
||||
this.isMulti,
|
||||
this.replyTime,
|
||||
});
|
||||
|
||||
ReplyMeItems.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
user = json['user'] != null ? User.fromJson(json['user']) : null;
|
||||
item = json['item'] != null ? Item.fromJson(json['item']) : null;
|
||||
counts = json['counts'];
|
||||
isMulti = json['is_multi'];
|
||||
replyTime = json['reply_time'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
if (user != null) {
|
||||
data['user'] = user!.toJson();
|
||||
}
|
||||
if (item != null) {
|
||||
data['item'] = item!.toJson();
|
||||
}
|
||||
data['counts'] = counts;
|
||||
data['is_multi'] = isMulti;
|
||||
data['reply_time'] = replyTime;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class User {
|
||||
int? mid;
|
||||
int? fans;
|
||||
String? nickname;
|
||||
String? avatar;
|
||||
String? midLink;
|
||||
bool? follow;
|
||||
|
||||
User(
|
||||
{this.mid,
|
||||
this.fans,
|
||||
this.nickname,
|
||||
this.avatar,
|
||||
this.midLink,
|
||||
this.follow});
|
||||
|
||||
User.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
fans = json['fans'];
|
||||
nickname = json['nickname'];
|
||||
avatar = json['avatar'];
|
||||
midLink = json['mid_link'];
|
||||
follow = json['follow'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['mid'] = mid;
|
||||
data['fans'] = fans;
|
||||
data['nickname'] = nickname;
|
||||
data['avatar'] = avatar;
|
||||
data['mid_link'] = midLink;
|
||||
data['follow'] = follow;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Item {
|
||||
int? subjectId;
|
||||
int? rootId;
|
||||
int? sourceId;
|
||||
int? targetId;
|
||||
String? type;
|
||||
int? businessId;
|
||||
String? business;
|
||||
String? title;
|
||||
String? desc;
|
||||
String? image;
|
||||
String? uri;
|
||||
String? nativeUri;
|
||||
String? detailTitle;
|
||||
String? rootReplyContent;
|
||||
String? sourceContent;
|
||||
String? targetReplyContent;
|
||||
List<AtDetails>? atDetails;
|
||||
List? topicDetails;
|
||||
bool? hideReplyButton;
|
||||
bool? hideLikeButton;
|
||||
int? likeState;
|
||||
dynamic danmu;
|
||||
String? message;
|
||||
|
||||
Item(
|
||||
{this.subjectId,
|
||||
this.rootId,
|
||||
this.sourceId,
|
||||
this.targetId,
|
||||
this.type,
|
||||
this.businessId,
|
||||
this.business,
|
||||
this.title,
|
||||
this.desc,
|
||||
this.image,
|
||||
this.uri,
|
||||
this.nativeUri,
|
||||
this.detailTitle,
|
||||
this.rootReplyContent,
|
||||
this.sourceContent,
|
||||
this.targetReplyContent,
|
||||
this.atDetails,
|
||||
this.topicDetails,
|
||||
this.hideReplyButton,
|
||||
this.hideLikeButton,
|
||||
this.likeState,
|
||||
this.danmu,
|
||||
this.message});
|
||||
|
||||
Item.fromJson(Map<String, dynamic> json) {
|
||||
subjectId = json['subject_id'];
|
||||
rootId = json['root_id'];
|
||||
sourceId = json['source_id'];
|
||||
targetId = json['target_id'];
|
||||
type = json['type'];
|
||||
businessId = json['business_id'];
|
||||
business = json['business'];
|
||||
title = json['title'];
|
||||
desc = json['desc'];
|
||||
image = json['image'];
|
||||
uri = json['uri'];
|
||||
nativeUri = json['native_uri'];
|
||||
detailTitle = json['detail_title'];
|
||||
rootReplyContent = json['root_reply_content'];
|
||||
sourceContent = json['source_content'];
|
||||
targetReplyContent = json['target_reply_content'];
|
||||
if (json['at_details'] != null) {
|
||||
atDetails = <AtDetails>[];
|
||||
json['at_details'].forEach((v) {
|
||||
atDetails!.add(AtDetails.fromJson(v));
|
||||
});
|
||||
}
|
||||
topicDetails = json['topic_details'];
|
||||
hideReplyButton = json['hide_reply_button'];
|
||||
hideLikeButton = json['hide_like_button'];
|
||||
likeState = json['like_state'];
|
||||
danmu = json['danmu'];
|
||||
message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['subject_id'] = subjectId;
|
||||
data['root_id'] = rootId;
|
||||
data['source_id'] = sourceId;
|
||||
data['target_id'] = targetId;
|
||||
data['type'] = type;
|
||||
data['business_id'] = businessId;
|
||||
data['business'] = business;
|
||||
data['title'] = title;
|
||||
data['desc'] = desc;
|
||||
data['image'] = image;
|
||||
data['uri'] = uri;
|
||||
data['native_uri'] = nativeUri;
|
||||
data['detail_title'] = detailTitle;
|
||||
data['root_reply_content'] = rootReplyContent;
|
||||
data['source_content'] = sourceContent;
|
||||
data['target_reply_content'] = targetReplyContent;
|
||||
data['at_details'] = atDetails?.map((v) => v.toJson()).toList();
|
||||
data['topic_details'] = topicDetails?.map((v) => v.toJson()).toList();
|
||||
data['hide_reply_button'] = hideReplyButton;
|
||||
data['hide_like_button'] = hideLikeButton;
|
||||
data['like_state'] = likeState;
|
||||
data['danmu'] = danmu;
|
||||
data['message'] = message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AtDetails {
|
||||
int? mid;
|
||||
int? fans;
|
||||
String? nickname;
|
||||
String? avatar;
|
||||
String? midLink;
|
||||
bool? follow;
|
||||
|
||||
AtDetails(
|
||||
{this.mid,
|
||||
this.fans,
|
||||
this.nickname,
|
||||
this.avatar,
|
||||
this.midLink,
|
||||
this.follow});
|
||||
|
||||
AtDetails.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['mid'];
|
||||
fans = json['fans'];
|
||||
nickname = json['nickname'];
|
||||
avatar = json['avatar'];
|
||||
midLink = json['mid_link'];
|
||||
follow = json['follow'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['mid'] = mid;
|
||||
data['fans'] = fans;
|
||||
data['nickname'] = nickname;
|
||||
data['avatar'] = avatar;
|
||||
data['mid_link'] = midLink;
|
||||
data['follow'] = follow;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user