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