announ_state.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
  2. import 'dart:convert';
  3. AnnounState announStateFromJson(String str) => AnnounState.fromJson(json.decode(str));
  4. String announStateToJson(AnnounState data) => json.encode(data.toJson());
  5. class AnnounState {
  6. AnnounState({
  7. required this.curPage,
  8. required this.pageSize,
  9. required this.list,
  10. required this.filterCount,
  11. });
  12. int curPage;
  13. int pageSize;
  14. List<Map<String, dynamic>> list;
  15. int filterCount;
  16. factory AnnounState.fromJson(Map<dynamic, dynamic> json) => AnnounState(
  17. curPage: json["curPage"],
  18. pageSize: json["pageSize"],
  19. list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
  20. filterCount: json["filterCount"],
  21. );
  22. Map<dynamic, dynamic> toJson() => {
  23. "curPage": curPage,
  24. "pageSize": pageSize,
  25. "list": List<dynamic>.from(list.map((x) => x)),
  26. "filterCount": filterCount,
  27. };
  28. AnnounState copyWith({
  29. int? curPage,
  30. int? pageSize,
  31. List<Map<String, dynamic>>? list,
  32. int? filterCount,
  33. }) {
  34. return AnnounState(
  35. curPage: curPage ?? this.curPage,
  36. pageSize: pageSize ?? this.pageSize,
  37. list: list ?? this.list,
  38. filterCount: filterCount ?? this.filterCount,
  39. );
  40. }
  41. }