mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 19:14:42 +08:00
29 lines
1008 B
Dart
29 lines
1008 B
Dart
import 'package:PiliPlus/models/search/search_trending/trending_list.dart';
|
|
|
|
class TrendingData {
|
|
String? trackid;
|
|
List<TrendingList>? list;
|
|
List<TrendingList>? topList;
|
|
String? hotwordEggInfo;
|
|
|
|
TrendingData({this.trackid, this.list, this.topList, this.hotwordEggInfo});
|
|
|
|
factory TrendingData.fromJson(Map<String, dynamic> json) => TrendingData(
|
|
trackid: json['trackid'] as String?,
|
|
list: (json['list'] as List<dynamic>?)
|
|
?.map((e) => TrendingList.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
topList: (json['top_list'] as List<dynamic>?)
|
|
?.map((e) => TrendingList.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
hotwordEggInfo: json['hotword_egg_info'] as String?,
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'trackid': trackid,
|
|
'list': list?.map((e) => e.toJson()).toList(),
|
|
'top_list': topList?.map((e) => e.toJson()).toList(),
|
|
'hotword_egg_info': hotwordEggInfo,
|
|
};
|
|
}
|