/// YApi QuickType插件生成，具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation

import 'dart:convert';

import 'package:widgets/load_state_layout.dart';

class PropertySaleState {
  //页面 LoadView 状态的展示
  LoadState loadingState;
  String? errorMessage;

  List<Map<String, dynamic>> list;

  PropertySaleState({
    this.loadingState = LoadState.State_Loading,
    String? errorMessage,
    required this.list,
  });

  Map<String, dynamic> toMap() {
    return {
      'loadingState': this.loadingState,
      'errorMessage': this.errorMessage,
      'list': this.list,
    };
  }
  factory PropertySaleState.fromMap(Map<String, dynamic> map) {
    return PropertySaleState(
      loadingState: map['loadingState'] as LoadState,
      errorMessage: map['errorMessage'] as String,
      list: map['list'] as List<Map<String, dynamic>>,
    );
  }

  PropertySaleState copyWith({
    LoadState? loadingState,
    String? errorMessage,
    List<Map<String, dynamic>>? list,
  }) {
    return PropertySaleState(
      loadingState: loadingState ?? this.loadingState,
      errorMessage: errorMessage ?? this.errorMessage,
      list: list ?? this.list,
    );
  }
}
