mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-27 22:05:53 +08:00
feat: search trending page
Closes #684 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
28
lib/models/search/search_trending/trending_data.dart
Normal file
28
lib/models/search/search_trending/trending_data.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user