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