mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-03 08:39:46 +08:00
13
lib/models_new/space/space/achieve.dart
Normal file
13
lib/models_new/space/space/achieve.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Achieve {
|
||||
bool? isDefault;
|
||||
String? image;
|
||||
String? achieveUrl;
|
||||
|
||||
Achieve({this.isDefault, this.image, this.achieveUrl});
|
||||
|
||||
factory Achieve.fromJson(Map<String, dynamic> json) => Achieve(
|
||||
isDefault: json['is_default'] as bool?,
|
||||
image: json['image'] as String?,
|
||||
achieveUrl: json['achieve_url'] as String?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/space/space/archive.dart
Normal file
26
lib/models_new/space/space/archive.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'package:PiliPlus/models_new/space/space/episodic_button.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/order.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
||||
|
||||
class Archive {
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<SpaceArchiveItem>? item;
|
||||
|
||||
Archive({this.episodicButton, this.order, this.count, this.item});
|
||||
|
||||
factory Archive.fromJson(Map<String, dynamic> json) => Archive(
|
||||
episodicButton: json['episodic_button'] == null
|
||||
? null
|
||||
: EpisodicButton.fromJson(
|
||||
json['episodic_button'] as Map<String, dynamic>),
|
||||
order: (json['order'] as List<dynamic>?)
|
||||
?.map((e) => Order.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
22
lib/models_new/space/space/article.dart
Normal file
22
lib/models_new/space/space/article.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:PiliPlus/models_new/space/space/list.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/item.dart';
|
||||
|
||||
class Article {
|
||||
int? count;
|
||||
List<SpaceArticleItem>? item;
|
||||
int? listsCount;
|
||||
List<ListItem>? lists;
|
||||
|
||||
Article({this.count, this.item, this.listsCount, this.lists});
|
||||
|
||||
factory Article.fromJson(Map<String, dynamic> json) => Article(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArticleItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
listsCount: json['lists_count'] as int?,
|
||||
lists: (json['lists'] as List<dynamic>?)
|
||||
?.map((e) => ListItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/attention_tip.dart
Normal file
11
lib/models_new/space/space/attention_tip.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class AttentionTip {
|
||||
int? cardNum;
|
||||
String? tip;
|
||||
|
||||
AttentionTip({this.cardNum, this.tip});
|
||||
|
||||
factory AttentionTip.fromJson(Map<String, dynamic> json) => AttentionTip(
|
||||
cardNum: json['card_num'] as int?,
|
||||
tip: json['tip'] as String?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/audios.dart
Normal file
15
lib/models_new/space/space/audios.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space/item.dart';
|
||||
|
||||
class Audios {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
|
||||
Audios({this.count, this.item});
|
||||
|
||||
factory Audios.fromJson(Map<String, dynamic> json) => Audios(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
42
lib/models_new/space/space/author.dart
Normal file
42
lib/models_new/space/space/author.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/nameplate.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/official_verify.dart';
|
||||
|
||||
class Author {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
Pendant? pendant;
|
||||
OfficialVerify? officialVerify;
|
||||
Nameplate? nameplate;
|
||||
Vip? vip;
|
||||
|
||||
Author({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.pendant,
|
||||
this.officialVerify,
|
||||
this.nameplate,
|
||||
this.vip,
|
||||
});
|
||||
|
||||
factory Author.fromJson(Map<String, dynamic> json) => Author(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: OfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>),
|
||||
nameplate: json['nameplate'] == null
|
||||
? null
|
||||
: Nameplate.fromJson(json['nameplate'] as Map<String, dynamic>),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
32
lib/models_new/space/space/badge.dart
Normal file
32
lib/models_new/space/space/badge.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Badge {
|
||||
String? text;
|
||||
String? textColor;
|
||||
String? textColorNight;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? borderColor;
|
||||
String? borderColorNight;
|
||||
int? bgStyle;
|
||||
|
||||
Badge({
|
||||
this.text,
|
||||
this.textColor,
|
||||
this.textColorNight,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.borderColor,
|
||||
this.borderColorNight,
|
||||
this.bgStyle,
|
||||
});
|
||||
|
||||
factory Badge.fromJson(Map<String, dynamic> json) => Badge(
|
||||
text: json['text'] as String?,
|
||||
textColor: json['text_color'] as String?,
|
||||
textColorNight: json['text_color_night'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
borderColor: json['border_color'] as String?,
|
||||
borderColorNight: json['border_color_night'] as String?,
|
||||
bgStyle: json['bg_style'] as int?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/button.dart
Normal file
13
lib/models_new/space/space/button.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Button {
|
||||
int? type;
|
||||
String? text;
|
||||
String? jumpUrl;
|
||||
|
||||
Button({this.type, this.text, this.jumpUrl});
|
||||
|
||||
factory Button.fromJson(Map<String, dynamic> json) => Button(
|
||||
type: json['type'] as int?,
|
||||
text: json['text'] as String?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
);
|
||||
}
|
||||
187
lib/models_new/space/space/card.dart
Normal file
187
lib/models_new/space/space/card.dart
Normal file
@@ -0,0 +1,187 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/achieve.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/entrance.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/honours.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/level_info.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/likes.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/live_fans_wearing.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/nameplate.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/nft_certificate.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/official_verify.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/pr_info.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/profession_verify.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/relation.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/space_tag.dart';
|
||||
|
||||
class SpaceCard {
|
||||
String? mid;
|
||||
String? name;
|
||||
bool? approve;
|
||||
String? rank;
|
||||
String? face;
|
||||
String? displayRank;
|
||||
int? regtime;
|
||||
int? spacesta;
|
||||
String? birthday;
|
||||
String? place;
|
||||
String? description;
|
||||
int? article;
|
||||
dynamic attentions;
|
||||
int? fans;
|
||||
int? friend;
|
||||
int? attention;
|
||||
String? sign;
|
||||
LevelInfo? levelInfo;
|
||||
Pendant? pendant;
|
||||
Nameplate? nameplate;
|
||||
OfficialVerify? officialVerify;
|
||||
ProfessionVerify? professionVerify;
|
||||
Vip? vip;
|
||||
int? silence;
|
||||
int? endTime;
|
||||
String? silenceUrl;
|
||||
Likes? likes;
|
||||
Achieve? achieve;
|
||||
SpaceRelation? relation;
|
||||
int? isDeleted;
|
||||
Honours? honours;
|
||||
LiveFansWearing? liveFansWearing;
|
||||
List<SpaceTag>? spaceTag;
|
||||
int? faceNftNew;
|
||||
bool? hasFaceNft;
|
||||
NftCertificate? nftCertificate;
|
||||
Entrance? entrance;
|
||||
String? nftId;
|
||||
dynamic nftFaceIcon;
|
||||
String? digitalId;
|
||||
int? digitalType;
|
||||
bool? hasDigitalAsset;
|
||||
SpacePrInfo? prInfo;
|
||||
|
||||
SpaceCard({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.approve,
|
||||
this.rank,
|
||||
this.face,
|
||||
this.displayRank,
|
||||
this.regtime,
|
||||
this.spacesta,
|
||||
this.birthday,
|
||||
this.place,
|
||||
this.description,
|
||||
this.article,
|
||||
this.attentions,
|
||||
this.fans,
|
||||
this.friend,
|
||||
this.attention,
|
||||
this.sign,
|
||||
this.levelInfo,
|
||||
this.pendant,
|
||||
this.nameplate,
|
||||
this.officialVerify,
|
||||
this.professionVerify,
|
||||
this.vip,
|
||||
this.silence,
|
||||
this.endTime,
|
||||
this.silenceUrl,
|
||||
this.likes,
|
||||
this.achieve,
|
||||
this.relation,
|
||||
this.isDeleted,
|
||||
this.honours,
|
||||
this.liveFansWearing,
|
||||
this.spaceTag,
|
||||
this.faceNftNew,
|
||||
this.hasFaceNft,
|
||||
this.nftCertificate,
|
||||
this.entrance,
|
||||
this.nftId,
|
||||
this.nftFaceIcon,
|
||||
this.digitalId,
|
||||
this.digitalType,
|
||||
this.hasDigitalAsset,
|
||||
this.prInfo,
|
||||
});
|
||||
|
||||
factory SpaceCard.fromJson(Map<String, dynamic> json) => SpaceCard(
|
||||
mid: json['mid'] as String?,
|
||||
name: json['name'] as String?,
|
||||
approve: json['approve'] as bool?,
|
||||
rank: json['rank'] as String?,
|
||||
face: json['face'] as String?,
|
||||
displayRank: json['DisplayRank'] as String?,
|
||||
regtime: json['regtime'] as int?,
|
||||
spacesta: json['spacesta'] as int?,
|
||||
birthday: json['birthday'] as String?,
|
||||
place: json['place'] as String?,
|
||||
description: json['description'] as String?,
|
||||
article: json['article'] as int?,
|
||||
attentions: json['attentions'] as dynamic,
|
||||
fans: json['fans'] as int?,
|
||||
friend: json['friend'] as int?,
|
||||
attention: json['attention'] as int?,
|
||||
sign: json['sign'] as String?,
|
||||
levelInfo: json['level_info'] == null
|
||||
? null
|
||||
: LevelInfo.fromJson(json['level_info'] as Map<String, dynamic>),
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
nameplate: json['nameplate'] == null
|
||||
? null
|
||||
: Nameplate.fromJson(json['nameplate'] as Map<String, dynamic>),
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: OfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>),
|
||||
professionVerify: json['profession_verify'] == null
|
||||
? null
|
||||
: ProfessionVerify.fromJson(
|
||||
json['profession_verify'] as Map<String, dynamic>),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
silence: json['silence'] as int?,
|
||||
endTime: json['end_time'] as int?,
|
||||
silenceUrl: json['silence_url'] as String?,
|
||||
likes: json['likes'] == null
|
||||
? null
|
||||
: Likes.fromJson(json['likes'] as Map<String, dynamic>),
|
||||
achieve: json['achieve'] == null
|
||||
? null
|
||||
: Achieve.fromJson(json['achieve'] as Map<String, dynamic>),
|
||||
relation: json['relation'] == null
|
||||
? null
|
||||
: SpaceRelation.fromJson(json['relation'] as Map<String, dynamic>),
|
||||
isDeleted: json['is_deleted'] as int?,
|
||||
honours: json['honours'] == null
|
||||
? null
|
||||
: Honours.fromJson(json['honours'] as Map<String, dynamic>),
|
||||
liveFansWearing: json['live_fans_wearing'] == null
|
||||
? null
|
||||
: LiveFansWearing.fromJson(
|
||||
json['live_fans_wearing'] as Map<String, dynamic>),
|
||||
spaceTag: (json['space_tag'] as List<dynamic>?)
|
||||
?.where((e) => (e?['title'] as String?)?.startsWith('IP') == true)
|
||||
.map((e) => SpaceTag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
faceNftNew: json['face_nft_new'] as int?,
|
||||
hasFaceNft: json['has_face_nft'] as bool?,
|
||||
nftCertificate: json['nft_certificate'] == null
|
||||
? null
|
||||
: NftCertificate.fromJson(
|
||||
json['nft_certificate'] as Map<String, dynamic>),
|
||||
entrance: json['entrance'] == null
|
||||
? null
|
||||
: Entrance.fromJson(json['entrance'] as Map<String, dynamic>),
|
||||
nftId: json['nft_id'] as String?,
|
||||
nftFaceIcon: json['nft_face_icon'] as dynamic,
|
||||
digitalId: json['digital_id'] as String?,
|
||||
digitalType: json['digital_type'] as int?,
|
||||
hasDigitalAsset: json['has_digital_asset'] as bool?,
|
||||
prInfo: json['pr_info'] == null
|
||||
? null
|
||||
: SpacePrInfo.fromJson(json['pr_info'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/category.dart
Normal file
13
lib/models_new/space/space/category.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Category {
|
||||
int? id;
|
||||
int? parentId;
|
||||
String? name;
|
||||
|
||||
Category({this.id, this.parentId, this.name});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'] as int?,
|
||||
parentId: json['parent_id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/cheese.dart
Normal file
15
lib/models_new/space/space/cheese.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space/item.dart';
|
||||
|
||||
class Cheese {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
|
||||
Cheese({this.count, this.item});
|
||||
|
||||
factory Cheese.fromJson(Map<String, dynamic> json) => Cheese(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/coin_archive.dart
Normal file
15
lib/models_new/space/space/coin_archive.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
||||
|
||||
class CoinArchive {
|
||||
int? count;
|
||||
List<SpaceArchiveItem>? item;
|
||||
|
||||
CoinArchive({this.count, this.item});
|
||||
|
||||
factory CoinArchive.fromJson(Map<String, dynamic> json) => CoinArchive(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
29
lib/models_new/space/space/collection_top_simple.dart
Normal file
29
lib/models_new/space/space/collection_top_simple.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:PiliPlus/models_new/space/space/preference.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/top.dart';
|
||||
|
||||
class CollectionTopSimple {
|
||||
Top? top;
|
||||
int? max;
|
||||
Preference? preference;
|
||||
String? collectionCompletedUrl;
|
||||
|
||||
CollectionTopSimple({
|
||||
this.top,
|
||||
this.max,
|
||||
this.preference,
|
||||
this.collectionCompletedUrl,
|
||||
});
|
||||
|
||||
factory CollectionTopSimple.fromJson(Map<String, dynamic> json) {
|
||||
return CollectionTopSimple(
|
||||
top: json['top'] == null
|
||||
? null
|
||||
: Top.fromJson(json['top'] as Map<String, dynamic>),
|
||||
max: json['max'] as int?,
|
||||
preference: json['preference'] == null
|
||||
? null
|
||||
: Preference.fromJson(json['preference'] as Map<String, dynamic>),
|
||||
collectionCompletedUrl: json['collection_completed_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
20
lib/models_new/space/space/color_config.dart
Normal file
20
lib/models_new/space/space/color_config.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:PiliPlus/models_new/space/space/day.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/night.dart';
|
||||
|
||||
class ColorConfig {
|
||||
bool? isDarkModeAware;
|
||||
Day? day;
|
||||
Night? night;
|
||||
|
||||
ColorConfig({this.isDarkModeAware, this.day, this.night});
|
||||
|
||||
factory ColorConfig.fromJson(Map<String, dynamic> json) => ColorConfig(
|
||||
isDarkModeAware: json['is_dark_mode_aware'] as bool?,
|
||||
day: json['day'] == null
|
||||
? null
|
||||
: Day.fromJson(json['day'] as Map<String, dynamic>),
|
||||
night: json['night'] == null
|
||||
? null
|
||||
: Night.fromJson(json['night'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/colour.dart
Normal file
11
lib/models_new/space/space/colour.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Colour {
|
||||
String? dark;
|
||||
String? normal;
|
||||
|
||||
Colour({this.dark, this.normal});
|
||||
|
||||
factory Colour.fromJson(Map<String, dynamic> json) => Colour(
|
||||
dark: json['dark'] as String?,
|
||||
normal: json['normal'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/comic.dart
Normal file
11
lib/models_new/space/space/comic.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Comic {
|
||||
int? count;
|
||||
List<dynamic>? item;
|
||||
|
||||
Comic({this.count, this.item});
|
||||
|
||||
factory Comic.fromJson(Map<String, dynamic> json) => Comic(
|
||||
count: json['count'] as int?,
|
||||
item: json['item'] as List<dynamic>?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/container_size.dart
Normal file
11
lib/models_new/space/space/container_size.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class ContainerSize {
|
||||
double? width;
|
||||
double? height;
|
||||
|
||||
ContainerSize({this.width, this.height});
|
||||
|
||||
factory ContainerSize.fromJson(Map<String, dynamic> json) => ContainerSize(
|
||||
width: (json['width'] as num?)?.toDouble(),
|
||||
height: (json['height'] as num?)?.toDouble(),
|
||||
);
|
||||
}
|
||||
9
lib/models_new/space/space/cover.dart
Normal file
9
lib/models_new/space/space/cover.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class Cover {
|
||||
String? url;
|
||||
|
||||
Cover({this.url});
|
||||
|
||||
factory Cover.fromJson(Map<String, dynamic> json) => Cover(
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
}
|
||||
183
lib/models_new/space/space/data.dart
Normal file
183
lib/models_new/space/space/data.dart
Normal file
@@ -0,0 +1,183 @@
|
||||
import 'package:PiliPlus/models_new/space/space/archive.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/article.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/attention_tip.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/audios.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/card.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/cheese.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/coin_archive.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/comic.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/elec.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/entry.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/favourite2.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/guard.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/images.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/like_archive.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/live.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/nft_show_module.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/play_game.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/season.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/series.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/setting.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/space_button_list.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/tab.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/tab2.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/ugc_season.dart';
|
||||
|
||||
class SpaceData {
|
||||
int? relation;
|
||||
int? guestRelation;
|
||||
int? medal;
|
||||
String? defaultTab;
|
||||
bool? isParams;
|
||||
SpaceSetting? setting;
|
||||
SpaceTab? tab;
|
||||
SpaceCard? card;
|
||||
SpaceImages? images;
|
||||
Live? live;
|
||||
Elec? elec;
|
||||
Archive? archive;
|
||||
SpaceSeries? series;
|
||||
PlayGame? playGame;
|
||||
Article? article;
|
||||
SpaceSeason? season;
|
||||
CoinArchive? coinArchive;
|
||||
LikeArchive? likeArchive;
|
||||
Audios? audios;
|
||||
Favourite2? favourite2;
|
||||
Comic? comic;
|
||||
UgcSeason? ugcSeason;
|
||||
int? adShopType;
|
||||
String? adContainerPath;
|
||||
Cheese? cheese;
|
||||
Guard? guard;
|
||||
AttentionTip? attentionTip;
|
||||
NftShowModule? nftShowModule;
|
||||
List<SpaceTab2>? tab2;
|
||||
dynamic nftFaceButton;
|
||||
dynamic digitalButton;
|
||||
List<Entry>? entry;
|
||||
List<SpaceButtonList>? spaceButtonList;
|
||||
int? relSpecial;
|
||||
|
||||
SpaceData({
|
||||
this.relation,
|
||||
this.guestRelation,
|
||||
this.medal,
|
||||
this.defaultTab,
|
||||
this.isParams,
|
||||
this.setting,
|
||||
this.tab,
|
||||
this.card,
|
||||
this.images,
|
||||
this.live,
|
||||
this.elec,
|
||||
this.archive,
|
||||
this.series,
|
||||
this.playGame,
|
||||
this.article,
|
||||
this.season,
|
||||
this.coinArchive,
|
||||
this.likeArchive,
|
||||
this.audios,
|
||||
this.favourite2,
|
||||
this.comic,
|
||||
this.ugcSeason,
|
||||
this.cheese,
|
||||
this.guard,
|
||||
this.attentionTip,
|
||||
this.nftShowModule,
|
||||
this.tab2,
|
||||
this.nftFaceButton,
|
||||
this.digitalButton,
|
||||
this.entry,
|
||||
this.spaceButtonList,
|
||||
this.relSpecial,
|
||||
});
|
||||
|
||||
factory SpaceData.fromJson(Map<String, dynamic> json) => SpaceData(
|
||||
relation: json['relation'] as int?,
|
||||
guestRelation: json['guest_relation'] as int?,
|
||||
medal: json['medal'] as int?,
|
||||
defaultTab: json['default_tab'] as String?,
|
||||
isParams: json['is_params'] as bool?,
|
||||
setting: json['setting'] == null
|
||||
? null
|
||||
: SpaceSetting.fromJson(json['setting'] as Map<String, dynamic>),
|
||||
tab: json['tab'] == null
|
||||
? null
|
||||
: SpaceTab.fromJson(json['tab'] as Map<String, dynamic>),
|
||||
card: json['card'] == null
|
||||
? null
|
||||
: SpaceCard.fromJson(json['card'] as Map<String, dynamic>),
|
||||
images: json['images'] == null
|
||||
? null
|
||||
: SpaceImages.fromJson(json['images'] as Map<String, dynamic>),
|
||||
live: json['live'] == null
|
||||
? null
|
||||
: Live.fromJson(json['live'] as Map<String, dynamic>),
|
||||
elec: json['elec'] == null
|
||||
? null
|
||||
: Elec.fromJson(json['elec'] as Map<String, dynamic>),
|
||||
archive: json['archive'] == null
|
||||
? null
|
||||
: Archive.fromJson(json['archive'] as Map<String, dynamic>),
|
||||
series: json['series'] == null
|
||||
? null
|
||||
: SpaceSeries.fromJson(json['series'] as Map<String, dynamic>),
|
||||
playGame: json['play_game'] == null
|
||||
? null
|
||||
: PlayGame.fromJson(json['play_game'] as Map<String, dynamic>),
|
||||
article: json['article'] == null
|
||||
? null
|
||||
: Article.fromJson(json['article'] as Map<String, dynamic>),
|
||||
season: json['season'] == null
|
||||
? null
|
||||
: SpaceSeason.fromJson(json['season'] as Map<String, dynamic>),
|
||||
coinArchive: json['coin_archive'] == null
|
||||
? null
|
||||
: CoinArchive.fromJson(
|
||||
json['coin_archive'] as Map<String, dynamic>),
|
||||
likeArchive: json['like_archive'] == null
|
||||
? null
|
||||
: LikeArchive.fromJson(
|
||||
json['like_archive'] as Map<String, dynamic>),
|
||||
audios: json['audios'] == null
|
||||
? null
|
||||
: Audios.fromJson(json['audios'] as Map<String, dynamic>),
|
||||
favourite2: json['favourite2'] == null
|
||||
? null
|
||||
: Favourite2.fromJson(json['favourite2'] as Map<String, dynamic>),
|
||||
comic: json['comic'] == null
|
||||
? null
|
||||
: Comic.fromJson(json['comic'] as Map<String, dynamic>),
|
||||
ugcSeason: json['ugc_season'] == null
|
||||
? null
|
||||
: UgcSeason.fromJson(json['ugc_season'] as Map<String, dynamic>),
|
||||
cheese: json['cheese'] == null
|
||||
? null
|
||||
: Cheese.fromJson(json['cheese'] as Map<String, dynamic>),
|
||||
guard: json['guard'] == null
|
||||
? null
|
||||
: Guard.fromJson(json['guard'] as Map<String, dynamic>),
|
||||
attentionTip: json['attention_tip'] == null
|
||||
? null
|
||||
: AttentionTip.fromJson(
|
||||
json['attention_tip'] as Map<String, dynamic>),
|
||||
nftShowModule: json['nft_show_module'] == null
|
||||
? null
|
||||
: NftShowModule.fromJson(
|
||||
json['nft_show_module'] as Map<String, dynamic>),
|
||||
tab2: (json['tab2'] as List<dynamic>?)
|
||||
?.map((e) => SpaceTab2.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
nftFaceButton: json['nft_face_button'] as dynamic,
|
||||
digitalButton: json['digital_button'] as dynamic,
|
||||
entry: (json['entry'] as List<dynamic>?)
|
||||
?.map((e) => Entry.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
spaceButtonList: (json['space_button_list'] as List<dynamic>?)
|
||||
?.map((e) => SpaceButtonList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
relSpecial: (json['rel_special'] as num?)?.toInt(),
|
||||
);
|
||||
}
|
||||
9
lib/models_new/space/space/day.dart
Normal file
9
lib/models_new/space/space/day.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class Day {
|
||||
String? argb;
|
||||
|
||||
Day({this.argb});
|
||||
|
||||
factory Day.fromJson(Map<String, dynamic> json) => Day(
|
||||
argb: json['argb'] as String?,
|
||||
);
|
||||
}
|
||||
44
lib/models_new/space/space/digital_info.dart
Normal file
44
lib/models_new/space/space/digital_info.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
class DigitalInfo {
|
||||
bool? active;
|
||||
String? jumpUrl;
|
||||
int? nftType;
|
||||
int? backgroundHandle;
|
||||
String? animationFirstFrame;
|
||||
dynamic musicAlbum;
|
||||
dynamic animation;
|
||||
String? nftRegionTitle;
|
||||
int? cardId;
|
||||
String? cutSpaceBg;
|
||||
int? partType;
|
||||
String? itemJumpUrl;
|
||||
|
||||
DigitalInfo({
|
||||
this.active,
|
||||
this.jumpUrl,
|
||||
this.nftType,
|
||||
this.backgroundHandle,
|
||||
this.animationFirstFrame,
|
||||
this.musicAlbum,
|
||||
this.animation,
|
||||
this.nftRegionTitle,
|
||||
this.cardId,
|
||||
this.cutSpaceBg,
|
||||
this.partType,
|
||||
this.itemJumpUrl,
|
||||
});
|
||||
|
||||
factory DigitalInfo.fromJson(Map<String, dynamic> json) => DigitalInfo(
|
||||
active: json['active'] as bool?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
nftType: json['nft_type'] as int?,
|
||||
backgroundHandle: json['background_handle'] as int?,
|
||||
animationFirstFrame: json['animation_first_frame'] as String?,
|
||||
musicAlbum: json['music_album'] as dynamic,
|
||||
animation: json['animation'] as dynamic,
|
||||
nftRegionTitle: json['nft_region_title'] as String?,
|
||||
cardId: json['card_id'] as int?,
|
||||
cutSpaceBg: json['cut_space_bg'] as String?,
|
||||
partType: json['part_type'] as int?,
|
||||
itemJumpUrl: json['item_jump_url'] as String?,
|
||||
);
|
||||
}
|
||||
20
lib/models_new/space/space/display.dart
Normal file
20
lib/models_new/space/space/display.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
class Display {
|
||||
String? bgThemeLight;
|
||||
String? bgThemeNight;
|
||||
String? nftPoster;
|
||||
String? nftRaw;
|
||||
|
||||
Display({
|
||||
this.bgThemeLight,
|
||||
this.bgThemeNight,
|
||||
this.nftPoster,
|
||||
this.nftRaw,
|
||||
});
|
||||
|
||||
factory Display.fromJson(Map<String, dynamic> json) => Display(
|
||||
bgThemeLight: json['bg_theme_light'] as String?,
|
||||
bgThemeNight: json['bg_theme_night'] as String?,
|
||||
nftPoster: json['nft_poster'] as String?,
|
||||
nftRaw: json['nft_raw'] as String?,
|
||||
);
|
||||
}
|
||||
18
lib/models_new/space/space/draw.dart
Normal file
18
lib/models_new/space/space/draw.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/space/space/color_config.dart';
|
||||
|
||||
class Draw {
|
||||
int? drawType;
|
||||
int? fillMode;
|
||||
ColorConfig? colorConfig;
|
||||
|
||||
Draw({this.drawType, this.fillMode, this.colorConfig});
|
||||
|
||||
factory Draw.fromJson(Map<String, dynamic> json) => Draw(
|
||||
drawType: json['draw_type'] as int?,
|
||||
fillMode: json['fill_mode'] as int?,
|
||||
colorConfig: json['color_config'] == null
|
||||
? null
|
||||
: ColorConfig.fromJson(
|
||||
json['color_config'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/draw_src.dart
Normal file
15
lib/models_new/space/space/draw_src.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space/draw.dart';
|
||||
|
||||
class DrawSrc {
|
||||
int? srcType;
|
||||
Draw? draw;
|
||||
|
||||
DrawSrc({this.srcType, this.draw});
|
||||
|
||||
factory DrawSrc.fromJson(Map<String, dynamic> json) => DrawSrc(
|
||||
srcType: json['src_type'] as int?,
|
||||
draw: json['draw'] == null
|
||||
? null
|
||||
: Draw.fromJson(json['draw'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
54
lib/models_new/space/space/elec.dart
Normal file
54
lib/models_new/space/space/elec.dart
Normal file
@@ -0,0 +1,54 @@
|
||||
import 'package:PiliPlus/models_new/space/space/elec_set.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/list.dart';
|
||||
|
||||
class Elec {
|
||||
bool? show;
|
||||
int? total;
|
||||
int? count;
|
||||
int? elecNum;
|
||||
List<ListItem>? list;
|
||||
ElecSet? elecSet;
|
||||
int? state;
|
||||
String? upowerTitle;
|
||||
String? upowerJumpUrl;
|
||||
String? upowerIconUrl;
|
||||
int? upowerState;
|
||||
String? rankTitle;
|
||||
String? rankUrl;
|
||||
|
||||
Elec({
|
||||
this.show,
|
||||
this.total,
|
||||
this.count,
|
||||
this.elecNum,
|
||||
this.list,
|
||||
this.elecSet,
|
||||
this.state,
|
||||
this.upowerTitle,
|
||||
this.upowerJumpUrl,
|
||||
this.upowerIconUrl,
|
||||
this.upowerState,
|
||||
this.rankTitle,
|
||||
this.rankUrl,
|
||||
});
|
||||
|
||||
factory Elec.fromJson(Map<String, dynamic> json) => Elec(
|
||||
show: json['show'] as bool?,
|
||||
total: json['total'] as int?,
|
||||
count: json['count'] as int?,
|
||||
elecNum: json['elec_num'] as int?,
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => ListItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
elecSet: json['elec_set'] == null
|
||||
? null
|
||||
: ElecSet.fromJson(json['elec_set'] as Map<String, dynamic>),
|
||||
state: json['state'] as int?,
|
||||
upowerTitle: json['upower_title'] as String?,
|
||||
upowerJumpUrl: json['upower_jump_url'] as String?,
|
||||
upowerIconUrl: json['upower_icon_url'] as String?,
|
||||
upowerState: json['upower_state'] as int?,
|
||||
rankTitle: json['rank_title'] as String?,
|
||||
rankUrl: json['rank_url'] as String?,
|
||||
);
|
||||
}
|
||||
44
lib/models_new/space/space/elec_list.dart
Normal file
44
lib/models_new/space/space/elec_list.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
class ElecList {
|
||||
String? title;
|
||||
int? elecNum;
|
||||
int? isCustomize;
|
||||
String? bpNum;
|
||||
String? minBp;
|
||||
String? maxBp;
|
||||
int? bpNumFen;
|
||||
int? isDefault;
|
||||
int? minElec;
|
||||
int? maxElec;
|
||||
int? minBpFen;
|
||||
int? maxBpFen;
|
||||
|
||||
ElecList({
|
||||
this.title,
|
||||
this.elecNum,
|
||||
this.isCustomize,
|
||||
this.bpNum,
|
||||
this.minBp,
|
||||
this.maxBp,
|
||||
this.bpNumFen,
|
||||
this.isDefault,
|
||||
this.minElec,
|
||||
this.maxElec,
|
||||
this.minBpFen,
|
||||
this.maxBpFen,
|
||||
});
|
||||
|
||||
factory ElecList.fromJson(Map<String, dynamic> json) => ElecList(
|
||||
title: json['title'] as String?,
|
||||
elecNum: json['elec_num'] as int?,
|
||||
isCustomize: json['is_customize'] as int?,
|
||||
bpNum: json['bp_num'] as String?,
|
||||
minBp: json['min_bp'] as String?,
|
||||
maxBp: json['max_bp'] as String?,
|
||||
bpNumFen: json['bp_num_fen'] as int?,
|
||||
isDefault: json['is_default'] as int?,
|
||||
minElec: json['min_elec'] as int?,
|
||||
maxElec: json['max_elec'] as int?,
|
||||
minBpFen: json['min_bp_fen'] as int?,
|
||||
maxBpFen: json['max_bp_fen'] as int?,
|
||||
);
|
||||
}
|
||||
30
lib/models_new/space/space/elec_set.dart
Normal file
30
lib/models_new/space/space/elec_set.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:PiliPlus/models_new/space/space/elec_list.dart';
|
||||
|
||||
class ElecSet {
|
||||
int? elecTheme;
|
||||
int? rmbRate;
|
||||
int? integrityRate;
|
||||
int? roundMode;
|
||||
List<ElecList>? elecList;
|
||||
String? batteryItemDesc;
|
||||
|
||||
ElecSet({
|
||||
this.elecTheme,
|
||||
this.rmbRate,
|
||||
this.integrityRate,
|
||||
this.roundMode,
|
||||
this.elecList,
|
||||
this.batteryItemDesc,
|
||||
});
|
||||
|
||||
factory ElecSet.fromJson(Map<String, dynamic> json) => ElecSet(
|
||||
elecTheme: json['elec_theme'] as int?,
|
||||
rmbRate: json['rmb_rate'] as int?,
|
||||
integrityRate: json['integrity_rate'] as int?,
|
||||
roundMode: json['round_mode'] as int?,
|
||||
elecList: (json['elec_list'] as List<dynamic>?)
|
||||
?.map((e) => ElecList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
batteryItemDesc: json['battery_item_desc'] as String?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/entrance.dart
Normal file
13
lib/models_new/space/space/entrance.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Entrance {
|
||||
String? icon;
|
||||
String? jumpUrl;
|
||||
bool? isShowEntrance;
|
||||
|
||||
Entrance({this.icon, this.jumpUrl, this.isShowEntrance});
|
||||
|
||||
factory Entrance.fromJson(Map<String, dynamic> json) => Entrance(
|
||||
icon: json['icon'] as String?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
isShowEntrance: json['is_show_entrance'] as bool?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/entrance_button.dart
Normal file
13
lib/models_new/space/space/entrance_button.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class EntranceButton {
|
||||
String? uri;
|
||||
String? title;
|
||||
|
||||
EntranceButton({this.uri, this.title});
|
||||
|
||||
factory EntranceButton.fromJson(Map<String, dynamic> json) {
|
||||
return EntranceButton(
|
||||
uri: json['uri'] as String?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
15
lib/models_new/space/space/entry.dart
Normal file
15
lib/models_new/space/space/entry.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class Entry {
|
||||
String? icon;
|
||||
String? jumpLink;
|
||||
String? accessibility;
|
||||
bool? needLogin;
|
||||
|
||||
Entry({this.icon, this.jumpLink, this.accessibility, this.needLogin});
|
||||
|
||||
factory Entry.fromJson(Map<String, dynamic> json) => Entry(
|
||||
icon: json['icon'] as String?,
|
||||
jumpLink: json['jump_link'] as String?,
|
||||
accessibility: json['accessibility'] as String?,
|
||||
needLogin: json['need_login'] as bool?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/episodic_button.dart
Normal file
13
lib/models_new/space/space/episodic_button.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class EpisodicButton {
|
||||
String? text;
|
||||
String? uri;
|
||||
|
||||
EpisodicButton({this.text, this.uri});
|
||||
|
||||
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
|
||||
return EpisodicButton(
|
||||
text: json['text'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
24
lib/models_new/space/space/extra.dart
Normal file
24
lib/models_new/space/space/extra.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:PiliPlus/models_new/space/space/card.dart';
|
||||
|
||||
class Extra {
|
||||
SpaceCard? card;
|
||||
int? salesType;
|
||||
int? upzoneEntranceType;
|
||||
String? upzoneEntranceReportId;
|
||||
|
||||
Extra({
|
||||
this.card,
|
||||
this.salesType,
|
||||
this.upzoneEntranceType,
|
||||
this.upzoneEntranceReportId,
|
||||
});
|
||||
|
||||
factory Extra.fromJson(Map<String, dynamic> json) => Extra(
|
||||
card: json['card'] == null
|
||||
? null
|
||||
: SpaceCard.fromJson(json['card'] as Map<String, dynamic>),
|
||||
salesType: json['sales_type'] as int?,
|
||||
upzoneEntranceType: json['upzone_entrance_type'] as int?,
|
||||
upzoneEntranceReportId: json['upzone_entrance_report_id'] as String?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/favourite2.dart
Normal file
15
lib/models_new/space/space/favourite2.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space_fav/list.dart';
|
||||
|
||||
class Favourite2 {
|
||||
int? count;
|
||||
List<SpaceFavItemModel>? item;
|
||||
|
||||
Favourite2({this.count, this.item});
|
||||
|
||||
factory Favourite2.fromJson(Map<String, dynamic> json) => Favourite2(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceFavItemModel.fromJson(e))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
23
lib/models_new/space/space/general_spec.dart
Normal file
23
lib/models_new/space/space/general_spec.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:PiliPlus/models_new/space/space/pos_spec.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/render_spec.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/size_spec.dart';
|
||||
|
||||
class GeneralSpec {
|
||||
PosSpec? posSpec;
|
||||
SizeSpec? sizeSpec;
|
||||
RenderSpec? renderSpec;
|
||||
|
||||
GeneralSpec({this.posSpec, this.sizeSpec, this.renderSpec});
|
||||
|
||||
factory GeneralSpec.fromJson(Map<String, dynamic> json) => GeneralSpec(
|
||||
posSpec: json['pos_spec'] == null
|
||||
? null
|
||||
: PosSpec.fromJson(json['pos_spec'] as Map<String, dynamic>),
|
||||
sizeSpec: json['size_spec'] == null
|
||||
? null
|
||||
: SizeSpec.fromJson(json['size_spec'] as Map<String, dynamic>),
|
||||
renderSpec: json['render_spec'] == null
|
||||
? null
|
||||
: RenderSpec.fromJson(json['render_spec'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
21
lib/models_new/space/space/guard.dart
Normal file
21
lib/models_new/space/space/guard.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'package:PiliPlus/models_new/space/space/item.dart';
|
||||
|
||||
class Guard {
|
||||
String? uri;
|
||||
String? desc;
|
||||
String? highLight;
|
||||
List<Item>? item;
|
||||
String? buttonMsg;
|
||||
|
||||
Guard({this.uri, this.desc, this.highLight, this.item, this.buttonMsg});
|
||||
|
||||
factory Guard.fromJson(Map<String, dynamic> json) => Guard(
|
||||
uri: json['uri'] as String?,
|
||||
desc: json['desc'] as String?,
|
||||
highLight: json['high_light'] as String?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
buttonMsg: json['button_msg'] as String?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/honours.dart
Normal file
15
lib/models_new/space/space/honours.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space/colour.dart';
|
||||
|
||||
class Honours {
|
||||
Colour? colour;
|
||||
List<dynamic>? tags;
|
||||
|
||||
Honours({this.colour, this.tags});
|
||||
|
||||
factory Honours.fromJson(Map<String, dynamic> json) => Honours(
|
||||
colour: json['colour'] == null
|
||||
? null
|
||||
: Colour.fromJson(json['colour'] as Map<String, dynamic>),
|
||||
tags: json['tags'] as List<dynamic>?,
|
||||
);
|
||||
}
|
||||
49
lib/models_new/space/space/images.dart
Normal file
49
lib/models_new/space/space/images.dart
Normal file
@@ -0,0 +1,49 @@
|
||||
import 'package:PiliPlus/models_new/space/space/collection_top_simple.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/digital_info.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/entrance_button.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/purchase_button.dart';
|
||||
|
||||
class SpaceImages {
|
||||
String? imgUrl;
|
||||
String? nightImgurl;
|
||||
bool? goodsAvailable;
|
||||
PurchaseButton? purchaseButton;
|
||||
EntranceButton? entranceButton;
|
||||
DigitalInfo? digitalInfo;
|
||||
bool? showDigital;
|
||||
CollectionTopSimple? collectionTopSimple;
|
||||
|
||||
SpaceImages({
|
||||
this.imgUrl,
|
||||
this.nightImgurl,
|
||||
this.goodsAvailable,
|
||||
this.purchaseButton,
|
||||
this.entranceButton,
|
||||
this.digitalInfo,
|
||||
this.showDigital,
|
||||
this.collectionTopSimple,
|
||||
});
|
||||
|
||||
factory SpaceImages.fromJson(Map<String, dynamic> json) => SpaceImages(
|
||||
imgUrl: json['imgUrl'] as String?,
|
||||
nightImgurl: json['night_imgurl'] as String?,
|
||||
goodsAvailable: json['goods_available'] as bool?,
|
||||
purchaseButton: json['purchase_button'] == null
|
||||
? null
|
||||
: PurchaseButton.fromJson(
|
||||
json['purchase_button'] as Map<String, dynamic>),
|
||||
entranceButton: json['entrance_button'] == null
|
||||
? null
|
||||
: EntranceButton.fromJson(
|
||||
json['entrance_button'] as Map<String, dynamic>),
|
||||
digitalInfo: json['digital_info'] == null
|
||||
? null
|
||||
: DigitalInfo.fromJson(
|
||||
json['digital_info'] as Map<String, dynamic>),
|
||||
showDigital: json['show_digital'] as bool?,
|
||||
collectionTopSimple: json['collection_top_simple'] == null
|
||||
? null
|
||||
: CollectionTopSimple.fromJson(
|
||||
json['collection_top_simple'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
108
lib/models_new/space/space/item.dart
Normal file
108
lib/models_new/space/space/item.dart
Normal file
@@ -0,0 +1,108 @@
|
||||
import 'package:PiliPlus/models_new/space/space/badge.dart';
|
||||
|
||||
class Item {
|
||||
String? title;
|
||||
String? subtitle;
|
||||
String? tname;
|
||||
String? cover;
|
||||
String? coverIcon;
|
||||
String? uri;
|
||||
String? param;
|
||||
String? goto;
|
||||
String? length;
|
||||
int? duration;
|
||||
bool? isPopular;
|
||||
bool? isSteins;
|
||||
bool? isUgcpay;
|
||||
bool? isCooperation;
|
||||
bool? isPgc;
|
||||
bool? isLivePlayback;
|
||||
bool? isPugv;
|
||||
bool? isFold;
|
||||
bool? isOneself;
|
||||
int? play;
|
||||
int? danmaku;
|
||||
int? ctime;
|
||||
int? ugcPay;
|
||||
List<Badge>? badges;
|
||||
String? author;
|
||||
bool? state;
|
||||
String? bvid;
|
||||
int? videos;
|
||||
int? firstCid;
|
||||
String? viewContent;
|
||||
int? iconType;
|
||||
String? publishTimeText;
|
||||
|
||||
Item({
|
||||
this.title,
|
||||
this.subtitle,
|
||||
this.tname,
|
||||
this.cover,
|
||||
this.coverIcon,
|
||||
this.uri,
|
||||
this.param,
|
||||
this.goto,
|
||||
this.length,
|
||||
this.duration,
|
||||
this.isPopular,
|
||||
this.isSteins,
|
||||
this.isUgcpay,
|
||||
this.isCooperation,
|
||||
this.isPgc,
|
||||
this.isLivePlayback,
|
||||
this.isPugv,
|
||||
this.isFold,
|
||||
this.isOneself,
|
||||
this.play,
|
||||
this.danmaku,
|
||||
this.ctime,
|
||||
this.ugcPay,
|
||||
this.badges,
|
||||
this.author,
|
||||
this.state,
|
||||
this.bvid,
|
||||
this.videos,
|
||||
this.firstCid,
|
||||
this.viewContent,
|
||||
this.iconType,
|
||||
this.publishTimeText,
|
||||
});
|
||||
|
||||
factory Item.fromJson(Map<String, dynamic> json) => Item(
|
||||
title: json['title'] as String?,
|
||||
subtitle: json['subtitle'] as String?,
|
||||
tname: json['tname'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
coverIcon: json['cover_icon'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
param: json['param'] as String?,
|
||||
goto: json['goto'] as String?,
|
||||
length: json['length'] as String?,
|
||||
duration: json['duration'] as int?,
|
||||
isPopular: json['is_popular'] as bool?,
|
||||
isSteins: json['is_steins'] as bool?,
|
||||
isUgcpay: json['is_ugcpay'] as bool?,
|
||||
isCooperation: json['is_cooperation'] as bool?,
|
||||
isPgc: json['is_pgc'] as bool?,
|
||||
isLivePlayback: json['is_live_playback'] as bool?,
|
||||
isPugv: json['is_pugv'] as bool?,
|
||||
isFold: json['is_fold'] as bool?,
|
||||
isOneself: json['is_oneself'] as bool?,
|
||||
play: json['play'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
ugcPay: json['ugc_pay'] as int?,
|
||||
badges: (json['badges'] as List<dynamic>?)
|
||||
?.map((e) => Badge.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
author: json['author'] as String?,
|
||||
state: json['state'] as bool?,
|
||||
bvid: json['bvid'] as String?,
|
||||
videos: json['videos'] as int?,
|
||||
firstCid: json['first_cid'] as int?,
|
||||
viewContent: json['view_content'] as String?,
|
||||
iconType: json['icon_type'] as int?,
|
||||
publishTimeText: json['publish_time_text'] as String?,
|
||||
);
|
||||
}
|
||||
32
lib/models_new/space/space/label.dart
Normal file
32
lib/models_new/space/space/label.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Label {
|
||||
String? path;
|
||||
String? text;
|
||||
String? labelTheme;
|
||||
String? textColor;
|
||||
int? bgStyle;
|
||||
String? bgColor;
|
||||
String? borderColor;
|
||||
String? image;
|
||||
|
||||
Label({
|
||||
this.path,
|
||||
this.text,
|
||||
this.labelTheme,
|
||||
this.textColor,
|
||||
this.bgStyle,
|
||||
this.bgColor,
|
||||
this.borderColor,
|
||||
this.image,
|
||||
});
|
||||
|
||||
factory Label.fromJson(Map<String, dynamic> json) => Label(
|
||||
path: json['path'] as String?,
|
||||
text: json['text'] as String?,
|
||||
labelTheme: json['label_theme'] as String?,
|
||||
textColor: json['text_color'] as String?,
|
||||
bgStyle: json['bg_style'] as int?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
borderColor: json['border_color'] as String?,
|
||||
image: json['image'] as String?,
|
||||
);
|
||||
}
|
||||
31
lib/models_new/space/space/level_info.dart
Normal file
31
lib/models_new/space/space/level_info.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:PiliPlus/models_new/space/space/senior_inquiry.dart';
|
||||
|
||||
class LevelInfo {
|
||||
int? currentLevel;
|
||||
int? currentMin;
|
||||
int? currentExp;
|
||||
dynamic nextExp;
|
||||
int? identity;
|
||||
SeniorInquiry? seniorInquiry;
|
||||
|
||||
LevelInfo({
|
||||
this.currentLevel,
|
||||
this.currentMin,
|
||||
this.currentExp,
|
||||
this.nextExp,
|
||||
this.identity,
|
||||
this.seniorInquiry,
|
||||
});
|
||||
|
||||
factory LevelInfo.fromJson(Map<String, dynamic> json) => LevelInfo(
|
||||
currentLevel: json['current_level'] as int?,
|
||||
currentMin: json['current_min'] as int?,
|
||||
currentExp: json['current_exp'] as int?,
|
||||
nextExp: json['next_exp'] as dynamic,
|
||||
identity: json['identity'] as int?,
|
||||
seniorInquiry: json['senior_inquiry'] == null
|
||||
? null
|
||||
: SeniorInquiry.fromJson(
|
||||
json['senior_inquiry'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/like_archive.dart
Normal file
15
lib/models_new/space/space/like_archive.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
||||
|
||||
class LikeArchive {
|
||||
int? count;
|
||||
List<SpaceArchiveItem>? item;
|
||||
|
||||
LikeArchive({this.count, this.item});
|
||||
|
||||
factory LikeArchive.fromJson(Map<String, dynamic> json) => LikeArchive(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/likes.dart
Normal file
11
lib/models_new/space/space/likes.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Likes {
|
||||
int? likeNum;
|
||||
String? skrTip;
|
||||
|
||||
Likes({this.likeNum, this.skrTip});
|
||||
|
||||
factory Likes.fromJson(Map<String, dynamic> json) => Likes(
|
||||
likeNum: json['like_num'] as int?,
|
||||
skrTip: json['skr_tip'] as String?,
|
||||
);
|
||||
}
|
||||
32
lib/models_new/space/space/list.dart
Normal file
32
lib/models_new/space/space/list.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class ListItem {
|
||||
int? payMid;
|
||||
int? rank;
|
||||
int? trendType;
|
||||
String? message;
|
||||
int? mid;
|
||||
dynamic vipInfo;
|
||||
String? uname;
|
||||
String? avatar;
|
||||
|
||||
ListItem({
|
||||
this.payMid,
|
||||
this.rank,
|
||||
this.trendType,
|
||||
this.message,
|
||||
this.mid,
|
||||
this.vipInfo,
|
||||
this.uname,
|
||||
this.avatar,
|
||||
});
|
||||
|
||||
factory ListItem.fromJson(Map<String, dynamic> json) => ListItem(
|
||||
payMid: json['pay_mid'] as int?,
|
||||
rank: json['rank'] as int?,
|
||||
trendType: json['trend_type'] as int?,
|
||||
message: json['message'] as String?,
|
||||
mid: json['mid'] as int?,
|
||||
vipInfo: json['vip_info'] as dynamic,
|
||||
uname: json['uname'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
);
|
||||
}
|
||||
41
lib/models_new/space/space/live.dart
Normal file
41
lib/models_new/space/space/live.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
class Live {
|
||||
int? roomStatus;
|
||||
int? roundStatus;
|
||||
int? liveStatus;
|
||||
String? url;
|
||||
String? title;
|
||||
String? cover;
|
||||
int? online;
|
||||
int? roomid;
|
||||
int? broadcastType;
|
||||
int? onlineHidden;
|
||||
String? link;
|
||||
|
||||
Live({
|
||||
this.roomStatus,
|
||||
this.roundStatus,
|
||||
this.liveStatus,
|
||||
this.url,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.online,
|
||||
this.roomid,
|
||||
this.broadcastType,
|
||||
this.onlineHidden,
|
||||
this.link,
|
||||
});
|
||||
|
||||
factory Live.fromJson(Map<String, dynamic> json) => Live(
|
||||
roomStatus: json['roomStatus'] as int?,
|
||||
roundStatus: json['roundStatus'] as int?,
|
||||
liveStatus: json['liveStatus'] as int?,
|
||||
url: json['url'] as String?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
online: json['online'] as int?,
|
||||
roomid: json['roomid'] as int?,
|
||||
broadcastType: json['broadcast_type'] as int?,
|
||||
onlineHidden: json['online_hidden'] as int?,
|
||||
link: json['link'] as String?,
|
||||
);
|
||||
}
|
||||
28
lib/models_new/space/space/live_fans_wearing.dart
Normal file
28
lib/models_new/space/space/live_fans_wearing.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
class LiveFansWearing {
|
||||
int? level;
|
||||
String? medalName;
|
||||
int? medalColorStart;
|
||||
int? medalColorEnd;
|
||||
int? medalColorBorder;
|
||||
String? medalJumpUrl;
|
||||
|
||||
LiveFansWearing({
|
||||
this.level,
|
||||
this.medalName,
|
||||
this.medalColorStart,
|
||||
this.medalColorEnd,
|
||||
this.medalColorBorder,
|
||||
this.medalJumpUrl,
|
||||
});
|
||||
|
||||
factory LiveFansWearing.fromJson(Map<String, dynamic> json) {
|
||||
return LiveFansWearing(
|
||||
level: json['level'] as int?,
|
||||
medalName: json['medal_name'] as String?,
|
||||
medalColorStart: json['medal_color_start'] as int?,
|
||||
medalColorEnd: json['medal_color_end'] as int?,
|
||||
medalColorBorder: json['medal_color_border'] as int?,
|
||||
medalJumpUrl: json['medal_jump_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
32
lib/models_new/space/space/media.dart
Normal file
32
lib/models_new/space/space/media.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Media {
|
||||
int? score;
|
||||
int? mediaId;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? area;
|
||||
int? typeId;
|
||||
String? typeName;
|
||||
int? spoiler;
|
||||
|
||||
Media({
|
||||
this.score,
|
||||
this.mediaId,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.area,
|
||||
this.typeId,
|
||||
this.typeName,
|
||||
this.spoiler,
|
||||
});
|
||||
|
||||
factory Media.fromJson(Map<String, dynamic> json) => Media(
|
||||
score: json['score'] as int?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
area: json['area'] as String?,
|
||||
typeId: json['type_id'] as int?,
|
||||
typeName: json['type_name'] as String?,
|
||||
spoiler: json['spoiler'] as int?,
|
||||
);
|
||||
}
|
||||
26
lib/models_new/space/space/nameplate.dart
Normal file
26
lib/models_new/space/space/nameplate.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class Nameplate {
|
||||
int? nid;
|
||||
String? name;
|
||||
String? image;
|
||||
String? imageSmall;
|
||||
String? level;
|
||||
String? condition;
|
||||
|
||||
Nameplate({
|
||||
this.nid,
|
||||
this.name,
|
||||
this.image,
|
||||
this.imageSmall,
|
||||
this.level,
|
||||
this.condition,
|
||||
});
|
||||
|
||||
factory Nameplate.fromJson(Map<String, dynamic> json) => Nameplate(
|
||||
nid: json['nid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
image: json['image'] as String?,
|
||||
imageSmall: json['image_small'] as String?,
|
||||
level: json['level'] as String?,
|
||||
condition: json['condition'] as String?,
|
||||
);
|
||||
}
|
||||
30
lib/models_new/space/space/nft.dart
Normal file
30
lib/models_new/space/space/nft.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:PiliPlus/models_new/space/space/display.dart';
|
||||
|
||||
class Nft {
|
||||
String? itemName;
|
||||
String? issuer;
|
||||
String? serialNumber;
|
||||
String? detailUrl;
|
||||
int? nftStatus;
|
||||
Display? display;
|
||||
|
||||
Nft({
|
||||
this.itemName,
|
||||
this.issuer,
|
||||
this.serialNumber,
|
||||
this.detailUrl,
|
||||
this.nftStatus,
|
||||
this.display,
|
||||
});
|
||||
|
||||
factory Nft.fromJson(Map<String, dynamic> json) => Nft(
|
||||
itemName: json['item_name'] as String?,
|
||||
issuer: json['issuer'] as String?,
|
||||
serialNumber: json['serial_number'] as String?,
|
||||
detailUrl: json['detail_url'] as String?,
|
||||
nftStatus: json['nft_status'] as int?,
|
||||
display: json['display'] == null
|
||||
? null
|
||||
: Display.fromJson(json['display'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/nft_certificate.dart
Normal file
11
lib/models_new/space/space/nft_certificate.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class NftCertificate {
|
||||
String? detailUrl;
|
||||
|
||||
NftCertificate({this.detailUrl});
|
||||
|
||||
factory NftCertificate.fromJson(Map<String, dynamic> json) {
|
||||
return NftCertificate(
|
||||
detailUrl: json['detail_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
24
lib/models_new/space/space/nft_show_module.dart
Normal file
24
lib/models_new/space/space/nft_show_module.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:PiliPlus/models_new/space/space/nft.dart';
|
||||
|
||||
class NftShowModule {
|
||||
int? total;
|
||||
String? artsMoreJump;
|
||||
List<Nft>? nfts;
|
||||
String? floorTitle;
|
||||
|
||||
NftShowModule({
|
||||
this.total,
|
||||
this.artsMoreJump,
|
||||
this.nfts,
|
||||
this.floorTitle,
|
||||
});
|
||||
|
||||
factory NftShowModule.fromJson(Map<String, dynamic> json) => NftShowModule(
|
||||
total: json['total'] as int?,
|
||||
artsMoreJump: json['arts_more_jump'] as String?,
|
||||
nfts: (json['nfts'] as List<dynamic>?)
|
||||
?.map((e) => Nft.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
floorTitle: json['floor_title'] as String?,
|
||||
);
|
||||
}
|
||||
9
lib/models_new/space/space/night.dart
Normal file
9
lib/models_new/space/space/night.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class Night {
|
||||
String? argb;
|
||||
|
||||
Night({this.argb});
|
||||
|
||||
factory Night.fromJson(Map<String, dynamic> json) => Night(
|
||||
argb: json['argb'] as String?,
|
||||
);
|
||||
}
|
||||
28
lib/models_new/space/space/official_verify.dart
Normal file
28
lib/models_new/space/space/official_verify.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
class OfficialVerify {
|
||||
int? type;
|
||||
String? desc;
|
||||
int? role;
|
||||
String? title;
|
||||
String? icon;
|
||||
String? spliceTitle;
|
||||
|
||||
OfficialVerify({
|
||||
this.type,
|
||||
this.desc,
|
||||
this.role,
|
||||
this.title,
|
||||
this.icon,
|
||||
this.spliceTitle,
|
||||
});
|
||||
|
||||
factory OfficialVerify.fromJson(Map<String, dynamic> json) {
|
||||
return OfficialVerify(
|
||||
type: json['type'] as int?,
|
||||
desc: json['desc'] as String?,
|
||||
role: json['role'] as int?,
|
||||
title: json['title'] as String?,
|
||||
icon: json['icon'] as String?,
|
||||
spliceTitle: json['splice_title'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
11
lib/models_new/space/space/order.dart
Normal file
11
lib/models_new/space/space/order.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Order {
|
||||
String? title;
|
||||
String? value;
|
||||
|
||||
Order({this.title, this.value});
|
||||
|
||||
factory Order.fromJson(Map<String, dynamic> json) => Order(
|
||||
title: json['title'] as String?,
|
||||
value: json['value'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/play_game.dart
Normal file
11
lib/models_new/space/space/play_game.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class PlayGame {
|
||||
int? count;
|
||||
List<dynamic>? item;
|
||||
|
||||
PlayGame({this.count, this.item});
|
||||
|
||||
factory PlayGame.fromJson(Map<String, dynamic> json) => PlayGame(
|
||||
count: json['count'] as int?,
|
||||
item: json['item'] as List<dynamic>?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/pos_spec.dart
Normal file
13
lib/models_new/space/space/pos_spec.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class PosSpec {
|
||||
int? coordinatePos;
|
||||
double? axisX;
|
||||
double? axisY;
|
||||
|
||||
PosSpec({this.coordinatePos, this.axisX, this.axisY});
|
||||
|
||||
factory PosSpec.fromJson(Map<String, dynamic> json) => PosSpec(
|
||||
coordinatePos: json['coordinate_pos'] as int?,
|
||||
axisX: (json['axis_x'] as num?)?.toDouble(),
|
||||
axisY: (json['axis_y'] as num?)?.toDouble(),
|
||||
);
|
||||
}
|
||||
34
lib/models_new/space/space/pr_info.dart
Normal file
34
lib/models_new/space/space/pr_info.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
class SpacePrInfo {
|
||||
SpacePrInfo(
|
||||
this.content,
|
||||
this.url,
|
||||
this.icon,
|
||||
this.iconNight,
|
||||
this.textColor,
|
||||
this.bgColor,
|
||||
this.textColorNight,
|
||||
this.bgColorNight,
|
||||
);
|
||||
|
||||
String? content;
|
||||
String? url;
|
||||
String? icon;
|
||||
String? iconNight;
|
||||
late String textColor;
|
||||
late String bgColor;
|
||||
late String textColorNight;
|
||||
late String bgColorNight;
|
||||
|
||||
SpacePrInfo.fromJson(Map<String, dynamic> json) {
|
||||
content = json['content'];
|
||||
if (content?.isNotEmpty == true) {
|
||||
url = json['url'];
|
||||
icon = json['icon'];
|
||||
iconNight = json['icon_night'];
|
||||
textColor = json['text_color'] ?? "#999999";
|
||||
bgColor = json['bg_color'] ?? "#e7e7e7";
|
||||
textColorNight = json['text_color_night'] ?? "#727272";
|
||||
bgColorNight = json['bg_color_night'] ?? "#2A2A2A";
|
||||
}
|
||||
}
|
||||
}
|
||||
13
lib/models_new/space/space/preference.dart
Normal file
13
lib/models_new/space/space/preference.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Preference {
|
||||
bool? collectionPublic;
|
||||
String? garbFirstGain;
|
||||
int? orderType;
|
||||
|
||||
Preference({this.collectionPublic, this.garbFirstGain, this.orderType});
|
||||
|
||||
factory Preference.fromJson(Map<String, dynamic> json) => Preference(
|
||||
collectionPublic: json['collection_public'] as bool?,
|
||||
garbFirstGain: json['garb_first_gain'] as String?,
|
||||
orderType: json['order_type'] as int?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/profession_verify.dart
Normal file
13
lib/models_new/space/space/profession_verify.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class ProfessionVerify {
|
||||
String? icon;
|
||||
String? showDesc;
|
||||
|
||||
ProfessionVerify({this.icon, this.showDesc});
|
||||
|
||||
factory ProfessionVerify.fromJson(Map<String, dynamic> json) {
|
||||
return ProfessionVerify(
|
||||
icon: json['icon'] as String?,
|
||||
showDesc: json['show_desc'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
13
lib/models_new/space/space/purchase_button.dart
Normal file
13
lib/models_new/space/space/purchase_button.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class PurchaseButton {
|
||||
String? uri;
|
||||
String? title;
|
||||
|
||||
PurchaseButton({this.uri, this.title});
|
||||
|
||||
factory PurchaseButton.fromJson(Map<String, dynamic> json) {
|
||||
return PurchaseButton(
|
||||
uri: json['uri'] as String?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
17
lib/models_new/space/space/relation.dart
Normal file
17
lib/models_new/space/space/relation.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
class SpaceRelation {
|
||||
int? status;
|
||||
int? isFollow;
|
||||
int? isFollowed;
|
||||
|
||||
SpaceRelation({
|
||||
this.status,
|
||||
this.isFollow,
|
||||
this.isFollowed,
|
||||
});
|
||||
|
||||
factory SpaceRelation.fromJson(Map<String, dynamic> json) => SpaceRelation(
|
||||
status: json['status'] as int?,
|
||||
isFollow: json['is_follow'] as int?,
|
||||
isFollowed: json['is_followed'] as int?,
|
||||
);
|
||||
}
|
||||
9
lib/models_new/space/space/render_spec.dart
Normal file
9
lib/models_new/space/space/render_spec.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class RenderSpec {
|
||||
int? opacity;
|
||||
|
||||
RenderSpec({this.opacity});
|
||||
|
||||
factory RenderSpec.fromJson(Map<String, dynamic> json) => RenderSpec(
|
||||
opacity: json['opacity'] as int?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/res_native_draw.dart
Normal file
13
lib/models_new/space/space/res_native_draw.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/space/space/draw_src.dart';
|
||||
|
||||
class ResNativeDraw {
|
||||
DrawSrc? drawSrc;
|
||||
|
||||
ResNativeDraw({this.drawSrc});
|
||||
|
||||
factory ResNativeDraw.fromJson(Map<String, dynamic> json) => ResNativeDraw(
|
||||
drawSrc: json['draw_src'] == null
|
||||
? null
|
||||
: DrawSrc.fromJson(json['draw_src'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
16
lib/models_new/space/space/resource.dart
Normal file
16
lib/models_new/space/space/resource.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:PiliPlus/models_new/space/space/res_native_draw.dart';
|
||||
|
||||
class Resource {
|
||||
int? resType;
|
||||
ResNativeDraw? resNativeDraw;
|
||||
|
||||
Resource({this.resType, this.resNativeDraw});
|
||||
|
||||
factory Resource.fromJson(Map<String, dynamic> json) => Resource(
|
||||
resType: json['res_type'] as int?,
|
||||
resNativeDraw: json['res_native_draw'] == null
|
||||
? null
|
||||
: ResNativeDraw.fromJson(
|
||||
json['res_native_draw'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/season.dart
Normal file
15
lib/models_new/space/space/season.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
||||
|
||||
class SpaceSeason {
|
||||
int? count;
|
||||
List<SpaceArchiveItem>? item;
|
||||
|
||||
SpaceSeason({this.count, this.item});
|
||||
|
||||
factory SpaceSeason.fromJson(Map<String, dynamic> json) => SpaceSeason(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/senior_inquiry.dart
Normal file
11
lib/models_new/space/space/senior_inquiry.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class SeniorInquiry {
|
||||
String? inquiryText;
|
||||
String? inquiryUrl;
|
||||
|
||||
SeniorInquiry({this.inquiryText, this.inquiryUrl});
|
||||
|
||||
factory SeniorInquiry.fromJson(Map<String, dynamic> json) => SeniorInquiry(
|
||||
inquiryText: json['inquiry_text'] as String?,
|
||||
inquiryUrl: json['inquiry_url'] as String?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space/series.dart
Normal file
13
lib/models_new/space/space/series.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/space/space/item.dart';
|
||||
|
||||
class SpaceSeries {
|
||||
List<Item>? item;
|
||||
|
||||
SpaceSeries({this.item});
|
||||
|
||||
factory SpaceSeries.fromJson(Map<String, dynamic> json) => SpaceSeries(
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
65
lib/models_new/space/space/setting.dart
Normal file
65
lib/models_new/space/space/setting.dart
Normal file
@@ -0,0 +1,65 @@
|
||||
class SpaceSetting {
|
||||
int? channel;
|
||||
int? favVideo;
|
||||
int? coinsVideo;
|
||||
int? likesVideo;
|
||||
int? bangumi;
|
||||
int? playedGame;
|
||||
int? groups;
|
||||
int? comic;
|
||||
int? bbq;
|
||||
int? dressUp;
|
||||
int? disableFollowing;
|
||||
int? livePlayback;
|
||||
int? closeSpaceMedal;
|
||||
int? onlyShowWearing;
|
||||
int? disableShowSchool;
|
||||
int? disableShowNft;
|
||||
int? disableShowFans;
|
||||
int? chargeVideo;
|
||||
int? lessonVideo;
|
||||
|
||||
SpaceSetting({
|
||||
this.channel,
|
||||
this.favVideo,
|
||||
this.coinsVideo,
|
||||
this.likesVideo,
|
||||
this.bangumi,
|
||||
this.playedGame,
|
||||
this.groups,
|
||||
this.comic,
|
||||
this.bbq,
|
||||
this.dressUp,
|
||||
this.disableFollowing,
|
||||
this.livePlayback,
|
||||
this.closeSpaceMedal,
|
||||
this.onlyShowWearing,
|
||||
this.disableShowSchool,
|
||||
this.disableShowNft,
|
||||
this.disableShowFans,
|
||||
this.chargeVideo,
|
||||
this.lessonVideo,
|
||||
});
|
||||
|
||||
factory SpaceSetting.fromJson(Map<String, dynamic> json) => SpaceSetting(
|
||||
channel: json['channel'] as int?,
|
||||
favVideo: json['fav_video'] as int?,
|
||||
coinsVideo: json['coins_video'] as int?,
|
||||
likesVideo: json['likes_video'] as int?,
|
||||
bangumi: json['bangumi'] as int?,
|
||||
playedGame: json['played_game'] as int?,
|
||||
groups: json['groups'] as int?,
|
||||
comic: json['comic'] as int?,
|
||||
bbq: json['bbq'] as int?,
|
||||
dressUp: json['dress_up'] as int?,
|
||||
disableFollowing: json['disable_following'] as int?,
|
||||
livePlayback: json['live_playback'] as int?,
|
||||
closeSpaceMedal: json['close_space_medal'] as int?,
|
||||
onlyShowWearing: json['only_show_wearing'] as int?,
|
||||
disableShowSchool: json['disable_show_school'] as int?,
|
||||
disableShowNft: json['disable_show_nft'] as int?,
|
||||
disableShowFans: json['disable_show_fans'] as int?,
|
||||
chargeVideo: json['charge_video'] as int?,
|
||||
lessonVideo: json['lesson_video'] as int?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space/size_spec.dart
Normal file
11
lib/models_new/space/space/size_spec.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class SizeSpec {
|
||||
double? width;
|
||||
double? height;
|
||||
|
||||
SizeSpec({this.width, this.height});
|
||||
|
||||
factory SizeSpec.fromJson(Map<String, dynamic> json) => SizeSpec(
|
||||
width: (json['width'] as num?)?.toDouble(),
|
||||
height: (json['height'] as num?)?.toDouble(),
|
||||
);
|
||||
}
|
||||
43
lib/models_new/space/space/space_button_list.dart
Normal file
43
lib/models_new/space/space/space_button_list.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
class SpaceButtonList {
|
||||
String? icon;
|
||||
String? title;
|
||||
String? subTitle;
|
||||
String? url;
|
||||
String? moduleType;
|
||||
String? titleDarkColor;
|
||||
String? titleLightColor;
|
||||
String? subTitleDarkColor;
|
||||
String? subTitleLightColor;
|
||||
String? backgroundDarkColor;
|
||||
String? backgroundLightColor;
|
||||
|
||||
SpaceButtonList({
|
||||
this.icon,
|
||||
this.title,
|
||||
this.subTitle,
|
||||
this.url,
|
||||
this.moduleType,
|
||||
this.titleDarkColor,
|
||||
this.titleLightColor,
|
||||
this.subTitleDarkColor,
|
||||
this.subTitleLightColor,
|
||||
this.backgroundDarkColor,
|
||||
this.backgroundLightColor,
|
||||
});
|
||||
|
||||
factory SpaceButtonList.fromJson(Map<String, dynamic> json) {
|
||||
return SpaceButtonList(
|
||||
icon: json['icon'] as String?,
|
||||
title: json['title'] as String?,
|
||||
subTitle: json['sub_title'] as String?,
|
||||
url: json['url'] as String?,
|
||||
moduleType: json['module_type'] as String?,
|
||||
titleDarkColor: json['title_dark_color'] as String?,
|
||||
titleLightColor: json['title_light_color'] as String?,
|
||||
subTitleDarkColor: json['sub_title_dark_color'] as String?,
|
||||
subTitleLightColor: json['sub_title_light_color'] as String?,
|
||||
backgroundDarkColor: json['background_dark_color'] as String?,
|
||||
backgroundLightColor: json['background_light_color'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
32
lib/models_new/space/space/space_tag.dart
Normal file
32
lib/models_new/space/space/space_tag.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class SpaceTag {
|
||||
String? type;
|
||||
String? title;
|
||||
String? textColor;
|
||||
String? nightTextColor;
|
||||
String? backgroundColor;
|
||||
String? nightBackgroundColor;
|
||||
String? uri;
|
||||
String? icon;
|
||||
|
||||
SpaceTag({
|
||||
this.type,
|
||||
this.title,
|
||||
this.textColor,
|
||||
this.nightTextColor,
|
||||
this.backgroundColor,
|
||||
this.nightBackgroundColor,
|
||||
this.uri,
|
||||
this.icon,
|
||||
});
|
||||
|
||||
factory SpaceTag.fromJson(Map<String, dynamic> json) => SpaceTag(
|
||||
type: json['type'] as String?,
|
||||
title: json['title'] as String?,
|
||||
textColor: json['text_color'] as String?,
|
||||
nightTextColor: json['night_text_color'] as String?,
|
||||
backgroundColor: json['background_color'] as String?,
|
||||
nightBackgroundColor: json['night_background_color'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
icon: json['icon'] as String?,
|
||||
);
|
||||
}
|
||||
32
lib/models_new/space/space/stats.dart
Normal file
32
lib/models_new/space/space/stats.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
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?,
|
||||
);
|
||||
}
|
||||
79
lib/models_new/space/space/tab.dart
Normal file
79
lib/models_new/space/space/tab.dart
Normal file
@@ -0,0 +1,79 @@
|
||||
class SpaceTab {
|
||||
bool? archive;
|
||||
bool? article;
|
||||
bool? clip;
|
||||
bool? album;
|
||||
bool? favorite;
|
||||
bool? bangumi;
|
||||
bool? coin;
|
||||
bool? like;
|
||||
bool? community;
|
||||
bool? dynam1c;
|
||||
bool? audios;
|
||||
bool? shop;
|
||||
bool? mall;
|
||||
bool? ugcSeason;
|
||||
bool? comic;
|
||||
bool? cheese;
|
||||
bool? subComic;
|
||||
bool? activity;
|
||||
bool? series;
|
||||
bool? charging;
|
||||
bool? opus;
|
||||
bool? cheeseVideo;
|
||||
bool? brand;
|
||||
bool? hasItem;
|
||||
|
||||
SpaceTab({
|
||||
this.archive,
|
||||
this.article,
|
||||
this.clip,
|
||||
this.album,
|
||||
this.favorite,
|
||||
this.bangumi,
|
||||
this.coin,
|
||||
this.like,
|
||||
this.community,
|
||||
this.dynam1c,
|
||||
this.audios,
|
||||
this.shop,
|
||||
this.mall,
|
||||
this.ugcSeason,
|
||||
this.comic,
|
||||
this.cheese,
|
||||
this.subComic,
|
||||
this.activity,
|
||||
this.series,
|
||||
this.charging,
|
||||
this.opus,
|
||||
this.cheeseVideo,
|
||||
this.brand,
|
||||
});
|
||||
|
||||
SpaceTab.fromJson(Map<String, dynamic> json) {
|
||||
archive = json['archive'] as bool?;
|
||||
article = json['article'] as bool?;
|
||||
clip = json['clip'] as bool?;
|
||||
album = json['album'] as bool?;
|
||||
favorite = json['favorite'] as bool?;
|
||||
bangumi = json['bangumi'] as bool?;
|
||||
coin = json['coin'] as bool?;
|
||||
like = json['like'] as bool?;
|
||||
community = json['community'] as bool?;
|
||||
dynam1c = json['dynamic'] as bool?;
|
||||
audios = json['audios'] as bool?;
|
||||
shop = json['shop'] as bool?;
|
||||
mall = json['mall'] as bool?;
|
||||
ugcSeason = json['ugc_season'] as bool?;
|
||||
comic = json['comic'] as bool?;
|
||||
cheese = json['cheese'] as bool?;
|
||||
subComic = json['sub_comic'] as bool?;
|
||||
activity = json['activity'] as bool?;
|
||||
series = json['series'] as bool?;
|
||||
charging = json['charging'] as bool?;
|
||||
opus = json['opus'] as bool?;
|
||||
cheeseVideo = json['cheese_video'] as bool?;
|
||||
brand = json['brand'] as bool?;
|
||||
hasItem = json.values.any((e) => e == true);
|
||||
}
|
||||
}
|
||||
105
lib/models_new/space/space/tab2.dart
Normal file
105
lib/models_new/space/space/tab2.dart
Normal file
@@ -0,0 +1,105 @@
|
||||
class SpaceTab2 {
|
||||
final String? title;
|
||||
final String? param;
|
||||
final List<SpaceTab2Item>? items;
|
||||
|
||||
const SpaceTab2({this.title, this.param, this.items});
|
||||
|
||||
factory SpaceTab2.fromJson(Map<String, dynamic> json) => SpaceTab2(
|
||||
title: json['title'] as String?,
|
||||
param: json['param'] as String?,
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => SpaceTab2Item.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
class SpaceTab2Item {
|
||||
final String? title;
|
||||
final String? param;
|
||||
final List<SpaceTab2SubItem>? items;
|
||||
final List<SpaceTabFilter>? filter;
|
||||
final int? seasonId;
|
||||
final int? seriesId;
|
||||
|
||||
const SpaceTab2Item({
|
||||
this.title,
|
||||
this.param,
|
||||
this.items,
|
||||
this.filter,
|
||||
this.seasonId,
|
||||
this.seriesId,
|
||||
});
|
||||
|
||||
factory SpaceTab2Item.fromJson(Map<String, dynamic> json) => SpaceTab2Item(
|
||||
title: json["title"],
|
||||
param: json["param"],
|
||||
items: (json["items"] as List?)
|
||||
?.map((e) => SpaceTab2SubItem.fromJson(e))
|
||||
.toList(),
|
||||
filter: (json["filter"] as List?)
|
||||
?.map((e) => SpaceTabFilter.fromJson(e))
|
||||
.toList(),
|
||||
seasonId: json['season_id'],
|
||||
seriesId: json['series_id'],
|
||||
);
|
||||
}
|
||||
|
||||
class SpaceTab2SubItem {
|
||||
String? title;
|
||||
String? param;
|
||||
List<SpaceTabFilter>? filter;
|
||||
int? seasonId;
|
||||
int? seriesId;
|
||||
|
||||
SpaceTab2SubItem({
|
||||
this.title,
|
||||
this.param,
|
||||
this.filter,
|
||||
this.seasonId,
|
||||
this.seriesId,
|
||||
});
|
||||
|
||||
factory SpaceTab2SubItem.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceTab2SubItem(
|
||||
title: json["title"],
|
||||
param: json["param"],
|
||||
filter: (json["filter"] as List?)
|
||||
?.map((e) => SpaceTabFilter.fromJson(e))
|
||||
.toList(),
|
||||
seasonId: json["season_id"],
|
||||
seriesId: json["series_id"],
|
||||
);
|
||||
}
|
||||
|
||||
class SpaceTabFilter {
|
||||
final String? text;
|
||||
final String meta;
|
||||
final String? tabName;
|
||||
|
||||
const SpaceTabFilter({
|
||||
this.text,
|
||||
this.meta = 'all',
|
||||
this.tabName,
|
||||
});
|
||||
|
||||
factory SpaceTabFilter.fromJson(Map<String, dynamic> json) => SpaceTabFilter(
|
||||
text: json["text"],
|
||||
meta: json["meta"] ?? 'all',
|
||||
tabName: json["tab_name"],
|
||||
);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (other is SpaceTabFilter) {
|
||||
return meta == other.meta;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => meta.hashCode;
|
||||
}
|
||||
9
lib/models_new/space/space/top.dart
Normal file
9
lib/models_new/space/space/top.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class Top {
|
||||
dynamic result;
|
||||
|
||||
Top({this.result});
|
||||
|
||||
factory Top.fromJson(Map<String, dynamic> json) => Top(
|
||||
result: json['result'] as dynamic,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space/ugc_season.dart
Normal file
15
lib/models_new/space/space/ugc_season.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/space/space/item.dart';
|
||||
|
||||
class UgcSeason {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
|
||||
UgcSeason({this.count, this.item});
|
||||
|
||||
factory UgcSeason.fromJson(Map<String, dynamic> json) => UgcSeason(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user