property_news_state.dart 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
  2. import 'dart:convert';
  3. PropertyNewsState propertyNewsStateFromJson(String str) => PropertyNewsState.fromJson(json.decode(str));
  4. String propertyNewsStateToJson(PropertyNewsState data) => json.encode(data.toJson());
  5. class PropertyNewsState {
  6. PropertyNewsState({
  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 PropertyNewsState.fromJson(Map<dynamic, dynamic> json) => PropertyNewsState(
  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. PropertyNewsState copyWith({
  29. int? curPage,
  30. int? pageSize,
  31. List<Map<String, dynamic>>? list,
  32. int? filterCount,
  33. }) {
  34. return PropertyNewsState(
  35. curPage: curPage ?? this.curPage,
  36. pageSize: pageSize ?? this.pageSize,
  37. list: list ?? this.list,
  38. filterCount: filterCount ?? this.filterCount,
  39. );
  40. }
  41. }