mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 03:15:14 +08:00
24
lib/models_new/live/live_second_list/data.dart
Normal file
24
lib/models_new/live/live_second_list/data.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_list_item.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_second_list/tag.dart';
|
||||
|
||||
class LiveSecondData {
|
||||
int? count;
|
||||
List<CardLiveItem>? cardList;
|
||||
List<LiveSecondTag>? newTags;
|
||||
|
||||
LiveSecondData({
|
||||
this.count,
|
||||
this.cardList,
|
||||
this.newTags,
|
||||
});
|
||||
|
||||
factory LiveSecondData.fromJson(Map<String, dynamic> json) => LiveSecondData(
|
||||
count: json['count'] as int?,
|
||||
cardList: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => CardLiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
newTags: (json['new_tags'] as List<dynamic>?)
|
||||
?.map((e) => LiveSecondTag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
17
lib/models_new/live/live_second_list/tag.dart
Normal file
17
lib/models_new/live/live_second_list/tag.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
class LiveSecondTag {
|
||||
int? id;
|
||||
String? name;
|
||||
String? sortType;
|
||||
|
||||
LiveSecondTag({
|
||||
this.id,
|
||||
this.name,
|
||||
this.sortType,
|
||||
});
|
||||
|
||||
factory LiveSecondTag.fromJson(Map json) => LiveSecondTag(
|
||||
id: json['id'],
|
||||
name: json['name'],
|
||||
sortType: json['sort_type'],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user