property_ioan_state.dart 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 PropertyIoanState {
  5. //页面 LoadView 状态的展示
  6. LoadState loadingState;
  7. String? errorMessage;
  8. List<dynamic> offerTextInfoList;
  9. String lowestFloatingRate;
  10. String othersOfferingPic;
  11. String lowestFixedRate;
  12. List<dynamic> othersOfferingInfoList;
  13. PropertyIoanState({
  14. this.loadingState = LoadState.State_Loading,
  15. String? errorMessage,
  16. required this.offerTextInfoList,
  17. required this.lowestFloatingRate,
  18. required this.othersOfferingPic,
  19. required this.lowestFixedRate,
  20. required this.othersOfferingInfoList,
  21. });
  22. PropertyIoanState copyWith({
  23. LoadState? loadingState,
  24. String? errorMessage,
  25. List<dynamic>? offerTextInfoList,
  26. String? lowestFloatingRate,
  27. String? othersOfferingPic,
  28. String? lowestFixedRate,
  29. List<dynamic>? othersOfferingInfoList,
  30. }) {
  31. return PropertyIoanState(
  32. loadingState: loadingState ?? this.loadingState,
  33. errorMessage: errorMessage ?? this.errorMessage,
  34. offerTextInfoList: offerTextInfoList ?? this.offerTextInfoList,
  35. lowestFloatingRate: lowestFloatingRate ?? this.lowestFloatingRate,
  36. othersOfferingPic: othersOfferingPic ?? this.othersOfferingPic,
  37. lowestFixedRate: lowestFixedRate ?? this.lowestFixedRate,
  38. othersOfferingInfoList: othersOfferingInfoList ?? this.othersOfferingInfoList,
  39. );
  40. }
  41. Map<String, dynamic> toMap() {
  42. return {
  43. 'loadingState': this.loadingState,
  44. 'errorMessage': this.errorMessage,
  45. 'offerTextInfoList': this.offerTextInfoList,
  46. 'lowestFloatingRate': this.lowestFloatingRate,
  47. 'othersOfferingPic': this.othersOfferingPic,
  48. 'lowestFixedRate': this.lowestFixedRate,
  49. 'othersOfferingInfoList': this.othersOfferingInfoList,
  50. };
  51. }
  52. factory PropertyIoanState.fromMap(Map<String, dynamic> map) {
  53. return PropertyIoanState(
  54. loadingState: map['loadingState'] as LoadState,
  55. errorMessage: map['errorMessage'] as String,
  56. offerTextInfoList: map['offerTextInfoList'] as List<dynamic>,
  57. lowestFloatingRate: map['lowestFloatingRate'] as String,
  58. othersOfferingPic: map['othersOfferingPic'] as String,
  59. lowestFixedRate: map['lowestFixedRate'] as String,
  60. othersOfferingInfoList: map['othersOfferingInfoList'] as List<dynamic>,
  61. );
  62. }
  63. }