12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
- import 'dart:convert';
- RewardsHomeState rewardsHomeStateFromJson(String str) =>
- RewardsHomeState.fromJson(json.decode(str));
- String rewardsHomeStateToJson(RewardsHomeState data) =>
- json.encode(data.toJson());
- class RewardsHomeState {
- RewardsHomeState({
- required this.curPage,
- required this.pageSize,
- required this.list,
- required this.filterCount,
- required this.lists,
- });
- int curPage;
- int pageSize;
- List<Map<String, dynamic>> list;
- int filterCount;
- List<Map<String, dynamic>> lists;
- factory RewardsHomeState.fromJson(Map<dynamic, dynamic> json) =>
- RewardsHomeState(
- curPage: json["curPage"],
- pageSize: json["pageSize"],
- list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
- filterCount: json["filterCount"],
- lists: List<Map<String, dynamic>>.from(json["lists"].map((x) => x)),
- );
- Map<dynamic, dynamic> toJson() => {
- "curPage": curPage,
- "pageSize": pageSize,
- "list": List<dynamic>.from(list.map((x) => x)),
- "filterCount": filterCount,
- "lists": List<dynamic>.from(lists.map((x) => x)),
- };
- RewardsHomeState copyWith({
- int? curPage,
- int? pageSize,
- List<Map<String, dynamic>>? list,
- int? filterCount,
- List<Map<String, dynamic>>? lists,
- }) {
- return RewardsHomeState(
- curPage: curPage ?? this.curPage,
- pageSize: pageSize ?? this.pageSize,
- list: list ?? this.list,
- filterCount: filterCount ?? this.filterCount,
- lists: list ?? this.lists,
- );
- }
- }
|