mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -1,13 +1,13 @@
|
||||
class Condition {
|
||||
class PgcIndexCondition {
|
||||
List<Filter>? filter;
|
||||
List<Order>? order;
|
||||
|
||||
Condition({
|
||||
PgcIndexCondition({
|
||||
this.filter,
|
||||
this.order,
|
||||
});
|
||||
|
||||
Condition.fromJson(Map json) {
|
||||
PgcIndexCondition.fromJson(Map json) {
|
||||
filter = (json['filter'] as List?)
|
||||
?.map((item) => Filter.fromJson(item))
|
||||
.toList();
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import 'package:PiliPlus/pages/bangumi/controller.dart';
|
||||
import 'package:PiliPlus/pages/bangumi/view.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/rank/index.dart';
|
||||
import 'package:PiliPlus/pages/rank/controller.dart';
|
||||
import 'package:PiliPlus/pages/rank/view.dart';
|
||||
import 'package:PiliPlus/pages/rcmd/controller.dart';
|
||||
import 'package:PiliPlus/pages/rcmd/view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPlus/pages/bangumi/index.dart';
|
||||
import 'package:PiliPlus/pages/hot/index.dart';
|
||||
import 'package:PiliPlus/pages/live/index.dart';
|
||||
import 'package:PiliPlus/pages/rcmd/index.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
|
||||
enum TabType { live, rcmd, hot, rank, bangumi, cinema }
|
||||
|
||||
@@ -8,17 +8,17 @@ part 'archive.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Archive {
|
||||
@JsonKey(name: 'episodic_button')
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
@JsonKey(name: 'episodic_button')
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<SpaceItem>? item;
|
||||
|
||||
Archive({this.episodicButton, this.order, this.count, this.item});
|
||||
Archive({this.episodicButton, this.order, this.count, this.item});
|
||||
|
||||
factory Archive.fromJson(Map<String, dynamic> json) {
|
||||
return _$ArchiveFromJson(json);
|
||||
}
|
||||
factory Archive.fromJson(Map<String, dynamic> json) {
|
||||
return _$ArchiveFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$ArchiveToJson(this);
|
||||
Map<String, dynamic> toJson() => _$ArchiveToJson(this);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ Archive _$ArchiveFromJson(Map<String, dynamic> json) => Archive(
|
||||
.toList(),
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => SpaceItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import 'vip.dart';
|
||||
part 'card.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Card {
|
||||
class SpaceCard {
|
||||
Avatar? avatar;
|
||||
String? mid;
|
||||
String? name;
|
||||
@@ -89,7 +89,7 @@ class Card {
|
||||
@JsonKey(name: 'has_digital_asset')
|
||||
bool? hasDigitalAsset;
|
||||
|
||||
Card({
|
||||
SpaceCard({
|
||||
this.avatar,
|
||||
this.mid,
|
||||
this.name,
|
||||
@@ -140,7 +140,7 @@ class Card {
|
||||
this.hasDigitalAsset,
|
||||
});
|
||||
|
||||
factory Card.fromJson(Map<String, dynamic> json) => _$CardFromJson(json);
|
||||
factory SpaceCard.fromJson(Map<String, dynamic> json) => _$CardFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CardToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'card.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Card _$CardFromJson(Map<String, dynamic> json) => Card(
|
||||
SpaceCard _$CardFromJson(Map<String, dynamic> json) => SpaceCard(
|
||||
avatar: json['avatar'] == null
|
||||
? null
|
||||
: Avatar.fromJson(json['avatar'] as Map<String, dynamic>),
|
||||
@@ -99,7 +99,7 @@ Card _$CardFromJson(Map<String, dynamic> json) => Card(
|
||||
hasDigitalAsset: json['has_digital_asset'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CardToJson(Card instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$CardToJson(SpaceCard instance) => <String, dynamic>{
|
||||
'avatar': instance.avatar,
|
||||
'mid': instance.mid,
|
||||
'name': instance.name,
|
||||
|
||||
@@ -6,7 +6,7 @@ part 'coin_archive.g.dart';
|
||||
@JsonSerializable()
|
||||
class CoinArchive {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
List<SpaceItem>? item;
|
||||
|
||||
CoinArchive({this.count, this.item});
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ part of 'coin_archive.dart';
|
||||
CoinArchive _$CoinArchiveFromJson(Map<String, dynamic> json) => CoinArchive(
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((json) => Item.fromJson(json))
|
||||
?.map((json) => SpaceItem.fromJson(json))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPlus/models/space_article/data.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'archive.dart';
|
||||
@@ -13,12 +14,11 @@ import 'series.dart';
|
||||
import 'setting.dart';
|
||||
import 'tab.dart';
|
||||
import 'tab2.dart';
|
||||
import 'package:PiliPlus/models/space_article/data.dart' as space;
|
||||
|
||||
part 'data.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Data {
|
||||
class SpaceData {
|
||||
int? relation;
|
||||
@JsonKey(name: 'rel_special')
|
||||
int? relSpecial;
|
||||
@@ -30,11 +30,11 @@ class Data {
|
||||
bool? isParams;
|
||||
Setting? setting;
|
||||
Tab? tab;
|
||||
Card? card;
|
||||
Images? images;
|
||||
SpaceCard? card;
|
||||
SpaceImages? images;
|
||||
Archive? archive;
|
||||
Series? series;
|
||||
space.Data? article;
|
||||
SpaceArticleData? article;
|
||||
Season? season;
|
||||
@JsonKey(name: 'coin_archive')
|
||||
CoinArchive? coinArchive;
|
||||
@@ -55,7 +55,7 @@ class Data {
|
||||
dynamic live;
|
||||
UgcSeason? ugcSeason;
|
||||
|
||||
Data({
|
||||
SpaceData({
|
||||
this.relation,
|
||||
this.relSpecial,
|
||||
this.guestRelation,
|
||||
@@ -83,7 +83,7 @@ class Data {
|
||||
this.ugcSeason,
|
||||
});
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json) => _$DataFromJson(json);
|
||||
factory SpaceData.fromJson(Map<String, dynamic> json) => _$DataFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DataToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'data.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
SpaceData _$DataFromJson(Map<String, dynamic> json) => SpaceData(
|
||||
relation: (json['relation'] as num?)?.toInt(),
|
||||
relSpecial: (json['rel_special'] as num?)?.toInt(),
|
||||
guestRelation: (json['guest_relation'] as num?)?.toInt(),
|
||||
@@ -20,10 +20,10 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
: Tab.fromJson(json['tab'] as Map<String, dynamic>),
|
||||
card: json['card'] == null
|
||||
? null
|
||||
: Card.fromJson(json['card'] as Map<String, dynamic>),
|
||||
: SpaceCard.fromJson(json['card'] as Map<String, dynamic>),
|
||||
images: json['images'] == null
|
||||
? null
|
||||
: Images.fromJson(json['images'] as Map<String, dynamic>),
|
||||
: SpaceImages.fromJson(json['images'] as Map<String, dynamic>),
|
||||
archive: json['archive'] == null
|
||||
? null
|
||||
: Archive.fromJson(json['archive'] as Map<String, dynamic>),
|
||||
@@ -32,7 +32,7 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
: Series.fromJson(json['series'] as Map<String, dynamic>),
|
||||
article: json['article'] == null
|
||||
? null
|
||||
: space.Data.fromJson(json['article'] as Map<String, dynamic>),
|
||||
: SpaceArticleData.fromJson(json['article'] as Map<String, dynamic>),
|
||||
season: json['season'] == null
|
||||
? null
|
||||
: Season.fromJson(json['season'] as Map<String, dynamic>),
|
||||
@@ -67,7 +67,7 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
: null,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DataToJson(Data instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$DataToJson(SpaceData instance) => <String, dynamic>{
|
||||
'relation': instance.relation,
|
||||
'rel_special': instance.relSpecial,
|
||||
'guest_relation': instance.guestRelation,
|
||||
|
||||
@@ -7,37 +7,37 @@ import 'purchase_button.dart';
|
||||
part 'images.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Images {
|
||||
String? imgUrl;
|
||||
@JsonKey(name: 'night_imgurl')
|
||||
String? nightImgurl;
|
||||
@JsonKey(name: 'has_garb')
|
||||
bool? hasGarb;
|
||||
@JsonKey(name: 'goods_available')
|
||||
bool? goodsAvailable;
|
||||
@JsonKey(name: 'purchase_button')
|
||||
PurchaseButton? purchaseButton;
|
||||
@JsonKey(name: 'entrance_button')
|
||||
EntranceButton? entranceButton;
|
||||
@JsonKey(name: 'digital_info')
|
||||
DigitalInfo? digitalInfo;
|
||||
@JsonKey(name: 'collection_top_simple')
|
||||
dynamic collectionTopSimple;
|
||||
class SpaceImages {
|
||||
String? imgUrl;
|
||||
@JsonKey(name: 'night_imgurl')
|
||||
String? nightImgurl;
|
||||
@JsonKey(name: 'has_garb')
|
||||
bool? hasGarb;
|
||||
@JsonKey(name: 'goods_available')
|
||||
bool? goodsAvailable;
|
||||
@JsonKey(name: 'purchase_button')
|
||||
PurchaseButton? purchaseButton;
|
||||
@JsonKey(name: 'entrance_button')
|
||||
EntranceButton? entranceButton;
|
||||
@JsonKey(name: 'digital_info')
|
||||
DigitalInfo? digitalInfo;
|
||||
@JsonKey(name: 'collection_top_simple')
|
||||
dynamic collectionTopSimple;
|
||||
|
||||
Images({
|
||||
this.imgUrl,
|
||||
this.nightImgurl,
|
||||
this.hasGarb,
|
||||
this.goodsAvailable,
|
||||
this.purchaseButton,
|
||||
this.entranceButton,
|
||||
this.digitalInfo,
|
||||
this.collectionTopSimple,
|
||||
});
|
||||
SpaceImages({
|
||||
this.imgUrl,
|
||||
this.nightImgurl,
|
||||
this.hasGarb,
|
||||
this.goodsAvailable,
|
||||
this.purchaseButton,
|
||||
this.entranceButton,
|
||||
this.digitalInfo,
|
||||
this.collectionTopSimple,
|
||||
});
|
||||
|
||||
factory Images.fromJson(Map<String, dynamic> json) {
|
||||
return _$ImagesFromJson(json);
|
||||
}
|
||||
factory SpaceImages.fromJson(Map<String, dynamic> json) {
|
||||
return _$ImagesFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$ImagesToJson(this);
|
||||
Map<String, dynamic> toJson() => _$ImagesToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'images.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Images _$ImagesFromJson(Map<String, dynamic> json) => Images(
|
||||
SpaceImages _$ImagesFromJson(Map<String, dynamic> json) => SpaceImages(
|
||||
imgUrl: json['imgUrl'] as String?,
|
||||
nightImgurl: json['night_imgurl'] as String?,
|
||||
hasGarb: json['has_garb'] as bool?,
|
||||
@@ -25,7 +25,7 @@ Images _$ImagesFromJson(Map<String, dynamic> json) => Images(
|
||||
collectionTopSimple: json['collection_top_simple'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ImagesToJson(Images instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$ImagesToJson(SpaceImages instance) => <String, dynamic>{
|
||||
'imgUrl': instance.imgUrl,
|
||||
'night_imgurl': instance.nightImgurl,
|
||||
'has_garb': instance.hasGarb,
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'package:json_annotation/json_annotation.dart';
|
||||
part 'item.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Item {
|
||||
class SpaceItem {
|
||||
String? title;
|
||||
String? subtitle;
|
||||
String? tname;
|
||||
@@ -57,7 +57,7 @@ class Item {
|
||||
@JsonKey(name: 'publish_time_text')
|
||||
String? publishTimeText;
|
||||
|
||||
Item({
|
||||
SpaceItem({
|
||||
this.title,
|
||||
this.subtitle,
|
||||
this.tname,
|
||||
@@ -94,7 +94,7 @@ class Item {
|
||||
this.publishTimeText,
|
||||
});
|
||||
|
||||
factory Item.fromJson(Map<String, dynamic> json) => _$ItemFromJson(json);
|
||||
factory SpaceItem.fromJson(Map<String, dynamic> json) => _$ItemFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ItemToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'item.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Item _$ItemFromJson(Map<String, dynamic> json) => Item(
|
||||
SpaceItem _$ItemFromJson(Map<String, dynamic> json) => SpaceItem(
|
||||
title: json['title'] as String?,
|
||||
subtitle: json['subtitle'] as String?,
|
||||
tname: json['tname'] as String?,
|
||||
@@ -45,7 +45,7 @@ Item _$ItemFromJson(Map<String, dynamic> json) => Item(
|
||||
publishTimeText: json['publish_time_text'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ItemToJson(Item instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$ItemToJson(SpaceItem instance) => <String, dynamic>{
|
||||
'title': instance.title,
|
||||
'subtitle': instance.subtitle,
|
||||
'tname': instance.tname,
|
||||
|
||||
@@ -6,7 +6,7 @@ part 'like_archive.g.dart';
|
||||
@JsonSerializable()
|
||||
class LikeArchive {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
List<SpaceItem>? item;
|
||||
|
||||
LikeArchive({this.count, this.item});
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ part of 'like_archive.dart';
|
||||
LikeArchive _$LikeArchiveFromJson(Map<String, dynamic> json) => LikeArchive(
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((json) => Item.fromJson(json))
|
||||
?.map((json) => SpaceItem.fromJson(json))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ part 'season.g.dart';
|
||||
@JsonSerializable()
|
||||
class Season {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
List<SpaceArchiveItem>? item;
|
||||
|
||||
Season({this.count, this.item});
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ part of 'season.dart';
|
||||
Season _$SeasonFromJson(Map<String, dynamic> json) => Season(
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ part 'space.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Space {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
Data? data;
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
SpaceData? data;
|
||||
|
||||
Space({this.code, this.message, this.ttl, this.data});
|
||||
Space({this.code, this.message, this.ttl, this.data});
|
||||
|
||||
factory Space.fromJson(Map<String, dynamic> json) => _$SpaceFromJson(json);
|
||||
factory Space.fromJson(Map<String, dynamic> json) => _$SpaceFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$SpaceToJson(this);
|
||||
Map<String, dynamic> toJson() => _$SpaceToJson(this);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ Space _$SpaceFromJson(Map<String, dynamic> json) => Space(
|
||||
ttl: (json['ttl'] as num?)?.toInt(),
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: Data.fromJson(json['data'] as Map<String, dynamic>),
|
||||
: SpaceData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SpaceToJson(Space instance) => <String, dynamic>{
|
||||
|
||||
@@ -6,13 +6,13 @@ part 'tab2.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Tab2 {
|
||||
String? title;
|
||||
String? param;
|
||||
List<Item>? items;
|
||||
String? title;
|
||||
String? param;
|
||||
List<SpaceItem>? items;
|
||||
|
||||
Tab2({this.title, this.param, this.items});
|
||||
Tab2({this.title, this.param, this.items});
|
||||
|
||||
factory Tab2.fromJson(Map<String, dynamic> json) => _$Tab2FromJson(json);
|
||||
factory Tab2.fromJson(Map<String, dynamic> json) => _$Tab2FromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$Tab2ToJson(this);
|
||||
Map<String, dynamic> toJson() => _$Tab2ToJson(this);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ Tab2 _$Tab2FromJson(Map<String, dynamic> json) => Tab2(
|
||||
title: json['title'] as String?,
|
||||
param: json['param'] as String?,
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => SpaceItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ import 'order.dart';
|
||||
part 'data.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Data {
|
||||
class SpaceArchiveData {
|
||||
@JsonKey(name: 'episodic_button')
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
List<SpaceArchiveItem>? item;
|
||||
@JsonKey(name: 'last_watched_locator')
|
||||
LastWatchedLocator? lastWatchedLocator;
|
||||
@JsonKey(name: 'has_next')
|
||||
@@ -22,7 +22,7 @@ class Data {
|
||||
bool? hasPrev;
|
||||
int? next;
|
||||
|
||||
Data({
|
||||
SpaceArchiveData({
|
||||
this.episodicButton,
|
||||
this.order,
|
||||
this.count,
|
||||
@@ -33,7 +33,8 @@ class Data {
|
||||
this.next,
|
||||
});
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json) => _$DataFromJson(json);
|
||||
factory SpaceArchiveData.fromJson(Map<String, dynamic> json) =>
|
||||
_$DataFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DataToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'data.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
SpaceArchiveData _$DataFromJson(Map<String, dynamic> json) => SpaceArchiveData(
|
||||
episodicButton: json['episodic_button'] == null
|
||||
? null
|
||||
: EpisodicButton.fromJson(
|
||||
@@ -16,7 +16,7 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
.toList(),
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
lastWatchedLocator: json['last_watched_locator'] == null
|
||||
? null
|
||||
@@ -27,7 +27,8 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
next: json['next'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DataToJson(Data instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$DataToJson(SpaceArchiveData instance) =>
|
||||
<String, dynamic>{
|
||||
'episodic_button': instance.episodicButton,
|
||||
'order': instance.order,
|
||||
'count': instance.count,
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'badge.dart';
|
||||
import 'cursor_attr.dart';
|
||||
import 'three_point.dart';
|
||||
|
||||
class Item extends BaseSimpleVideoItemModel {
|
||||
class SpaceArchiveItem extends BaseSimpleVideoItemModel {
|
||||
String? subtitle;
|
||||
String? tname;
|
||||
String? get cover => pic; // 不知道哪里使用了cover
|
||||
@@ -34,7 +34,7 @@ class Item extends BaseSimpleVideoItemModel {
|
||||
Map? season;
|
||||
Map? history;
|
||||
|
||||
Item.fromJson(Map<String, dynamic> json) {
|
||||
SpaceArchiveItem.fromJson(Map<String, dynamic> json) {
|
||||
title = json['title'];
|
||||
subtitle = json['subtitle'];
|
||||
tname = json['tname'];
|
||||
|
||||
@@ -6,16 +6,16 @@ part 'space_archive.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class SpaceArchive {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
Data? data;
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
SpaceArchiveData? data;
|
||||
|
||||
SpaceArchive({this.code, this.message, this.ttl, this.data});
|
||||
SpaceArchive({this.code, this.message, this.ttl, this.data});
|
||||
|
||||
factory SpaceArchive.fromJson(Map<String, dynamic> json) {
|
||||
return _$SpaceArchiveFromJson(json);
|
||||
}
|
||||
factory SpaceArchive.fromJson(Map<String, dynamic> json) {
|
||||
return _$SpaceArchiveFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$SpaceArchiveToJson(this);
|
||||
Map<String, dynamic> toJson() => _$SpaceArchiveToJson(this);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ SpaceArchive _$SpaceArchiveFromJson(Map<String, dynamic> json) => SpaceArchive(
|
||||
ttl: (json['ttl'] as num?)?.toInt(),
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: Data.fromJson(json['data'] as Map<String, dynamic>),
|
||||
: SpaceArchiveData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SpaceArchiveToJson(SpaceArchive instance) =>
|
||||
|
||||
@@ -6,16 +6,17 @@ import 'list.dart';
|
||||
part 'data.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Data {
|
||||
class SpaceArticleData {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
List<SpaceArticleItem>? item;
|
||||
@JsonKey(name: 'lists_count')
|
||||
int? listsCount;
|
||||
List<ArticleList>? lists;
|
||||
|
||||
Data({this.count, this.item, this.listsCount, this.lists});
|
||||
SpaceArticleData({this.count, this.item, this.listsCount, this.lists});
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json) => _$DataFromJson(json);
|
||||
factory SpaceArticleData.fromJson(Map<String, dynamic> json) =>
|
||||
_$DataFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DataToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@ part of 'data.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
SpaceArticleData _$DataFromJson(Map<String, dynamic> json) => SpaceArticleData(
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((item) => Item.fromJson(item))
|
||||
?.map((item) => SpaceArticleItem.fromJson(item))
|
||||
.toList(),
|
||||
listsCount: (json['lists_count'] as num?)?.toInt(),
|
||||
lists: (json['lists'] as List<dynamic>?)
|
||||
@@ -17,7 +17,8 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DataToJson(Data instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$DataToJson(SpaceArticleData instance) =>
|
||||
<String, dynamic>{
|
||||
'count': instance.count,
|
||||
'item': instance.item,
|
||||
'lists_count': instance.listsCount,
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'category.dart';
|
||||
import 'media.dart';
|
||||
import 'stats.dart';
|
||||
|
||||
class Item {
|
||||
class SpaceArticleItem {
|
||||
int? id;
|
||||
Category? category;
|
||||
List<Category>? categories;
|
||||
@@ -56,7 +56,7 @@ class Item {
|
||||
String? dynIdStr;
|
||||
int? totalArtNum;
|
||||
|
||||
Item.fromJson(Map<String, dynamic> json) {
|
||||
SpaceArticleItem.fromJson(Map<String, dynamic> json) {
|
||||
id = json["id"];
|
||||
category =
|
||||
json["category"] == null ? null : Category.fromJson(json["category"]);
|
||||
|
||||
@@ -6,16 +6,16 @@ part 'space_article.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class SpaceArticle {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
Data? data;
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
SpaceArticleData? data;
|
||||
|
||||
SpaceArticle({this.code, this.message, this.ttl, this.data});
|
||||
SpaceArticle({this.code, this.message, this.ttl, this.data});
|
||||
|
||||
factory SpaceArticle.fromJson(Map<String, dynamic> json) {
|
||||
return _$SpaceArticleFromJson(json);
|
||||
}
|
||||
factory SpaceArticle.fromJson(Map<String, dynamic> json) {
|
||||
return _$SpaceArticleFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$SpaceArticleToJson(this);
|
||||
Map<String, dynamic> toJson() => _$SpaceArticleToJson(this);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ SpaceArticle _$SpaceArticleFromJson(Map<String, dynamic> json) => SpaceArticle(
|
||||
ttl: (json['ttl'] as num?)?.toInt(),
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: Data.fromJson(json['data'] as Map<String, dynamic>),
|
||||
: SpaceArticleData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SpaceArticleToJson(SpaceArticle instance) =>
|
||||
|
||||
@@ -5,15 +5,16 @@ import 'media_list_response.dart';
|
||||
part 'datum.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Datum {
|
||||
int? id;
|
||||
String? name;
|
||||
MediaListResponse? mediaListResponse;
|
||||
String? uri;
|
||||
class SpaceFavData {
|
||||
int? id;
|
||||
String? name;
|
||||
MediaListResponse? mediaListResponse;
|
||||
String? uri;
|
||||
|
||||
Datum({this.id, this.name, this.mediaListResponse, this.uri});
|
||||
SpaceFavData({this.id, this.name, this.mediaListResponse, this.uri});
|
||||
|
||||
factory Datum.fromJson(Map<String, dynamic> json) => _$DatumFromJson(json);
|
||||
factory SpaceFavData.fromJson(Map<String, dynamic> json) =>
|
||||
_$DatumFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DatumToJson(this);
|
||||
Map<String, dynamic> toJson() => _$DatumToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'datum.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Datum _$DatumFromJson(Map<String, dynamic> json) => Datum(
|
||||
SpaceFavData _$DatumFromJson(Map<String, dynamic> json) => SpaceFavData(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
name: json['name'] as String?,
|
||||
mediaListResponse: json['mediaListResponse'] == null
|
||||
@@ -16,7 +16,7 @@ Datum _$DatumFromJson(Map<String, dynamic> json) => Datum(
|
||||
uri: json['uri'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DatumToJson(Datum instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$DatumToJson(SpaceFavData instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'mediaListResponse': instance.mediaListResponse,
|
||||
|
||||
@@ -6,16 +6,16 @@ part 'space_fav.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class SpaceFav {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
List<Datum>? data;
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
List<SpaceFavData>? data;
|
||||
|
||||
SpaceFav({this.code, this.message, this.ttl, this.data});
|
||||
SpaceFav({this.code, this.message, this.ttl, this.data});
|
||||
|
||||
factory SpaceFav.fromJson(Map<String, dynamic> json) {
|
||||
return _$SpaceFavFromJson(json);
|
||||
}
|
||||
factory SpaceFav.fromJson(Map<String, dynamic> json) {
|
||||
return _$SpaceFavFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$SpaceFavToJson(this);
|
||||
Map<String, dynamic> toJson() => _$SpaceFavToJson(this);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ SpaceFav _$SpaceFavFromJson(Map<String, dynamic> json) => SpaceFav(
|
||||
message: json['message'] as String?,
|
||||
ttl: (json['ttl'] as num?)?.toInt(),
|
||||
data: (json['data'] as List<dynamic>?)
|
||||
?.map((e) => Datum.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => SpaceFavData.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user