property_sale_state.dart 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
  2. import 'dart:convert';
  3. import 'package:widgets/load_state_layout.dart';
  4. class PropertySaleState {
  5. //页面 LoadView 状态的展示
  6. LoadState loadingState;
  7. String? errorMessage;
  8. List<Map<String, dynamic>> list;
  9. PropertySaleState({
  10. this.loadingState = LoadState.State_Loading,
  11. String? errorMessage,
  12. required this.list,
  13. });
  14. Map<String, dynamic> toMap() {
  15. return {
  16. 'loadingState': this.loadingState,
  17. 'errorMessage': this.errorMessage,
  18. 'list': this.list,
  19. };
  20. }
  21. factory PropertySaleState.fromMap(Map<String, dynamic> map) {
  22. return PropertySaleState(
  23. loadingState: map['loadingState'] as LoadState,
  24. errorMessage: map['errorMessage'] as String,
  25. list: map['list'] as List<Map<String, dynamic>>,
  26. );
  27. }
  28. PropertySaleState copyWith({
  29. LoadState? loadingState,
  30. String? errorMessage,
  31. List<Map<String, dynamic>>? list,
  32. }) {
  33. return PropertySaleState(
  34. loadingState: loadingState ?? this.loadingState,
  35. errorMessage: errorMessage ?? this.errorMessage,
  36. list: list ?? this.list,
  37. );
  38. }
  39. }