/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation import 'dart:convert'; import 'package:widgets/load_state_layout.dart'; class PropertyRentState { //页面 LoadView 状态的展示 LoadState loadingState; String? errorMessage; int? curPage; int? pageSize = 10; int? filterCount = 0; List> list; PropertyRentState({ this.loadingState = LoadState.State_Loading, String? errorMessage, this.curPage = 1, this.pageSize = 10, this.filterCount = 0, required this.list, }); Map toMap() { return { 'loadingState': this.loadingState, 'errorMessage': this.errorMessage, 'curPage': this.curPage, 'pageSize': this.pageSize, 'filterCount': this.filterCount, 'list': this.list, }; } factory PropertyRentState.fromMap(Map map) { return PropertyRentState( loadingState: map['loadingState'] as LoadState, errorMessage: map['errorMessage'] as String, curPage: map['curPage'] as int, pageSize: map['pageSize'] as int, filterCount: map['filterCount'] as int, list: map['list'] as List>, ); } PropertyRentState copyWith({ LoadState? loadingState, String? errorMessage, int? curPage, int? pageSize, int? filterCount, List>? list, }) { return PropertyRentState( loadingState: loadingState ?? this.loadingState, errorMessage: errorMessage ?? this.errorMessage, curPage: curPage ?? this.curPage, pageSize: pageSize ?? this.pageSize, filterCount: filterCount ?? this.filterCount, list: list ?? this.list, ); } }