mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 19:14:42 +08:00
feat: space opus
Closes #833 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
26
lib/models/space_opus/data.dart
Normal file
26
lib/models/space_opus/data.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'package:PiliPlus/models/space_opus/item.dart';
|
||||
|
||||
class SpaceOpusData {
|
||||
bool? hasMore;
|
||||
List<SpaceOpusItemModel>? items;
|
||||
String? offset;
|
||||
int? updateNum;
|
||||
|
||||
SpaceOpusData({this.hasMore, this.items, this.offset, this.updateNum});
|
||||
|
||||
factory SpaceOpusData.fromJson(Map<String, dynamic> json) => SpaceOpusData(
|
||||
hasMore: json['has_more'] as bool?,
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => SpaceOpusItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
offset: json['offset'] as String?,
|
||||
updateNum: json['update_num'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'has_more': hasMore,
|
||||
'items': items?.map((e) => e.toJson()).toList(),
|
||||
'offset': offset,
|
||||
'update_num': updateNum,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user