123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /// 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<Map<String, dynamic>> list;
- PropertyRentState({
- this.loadingState = LoadState.State_Loading,
- String? errorMessage,
- this.curPage = 1,
- this.pageSize = 10,
- this.filterCount = 0,
- required this.list,
- });
- Map<String, dynamic> toMap() {
- return {
- 'loadingState': this.loadingState,
- 'errorMessage': this.errorMessage,
- 'curPage': this.curPage,
- 'pageSize': this.pageSize,
- 'filterCount': this.filterCount,
- 'list': this.list,
- };
- }
- factory PropertyRentState.fromMap(Map<String, dynamic> 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<Map<String, dynamic>>,
- );
- }
- PropertyRentState copyWith({
- LoadState? loadingState,
- String? errorMessage,
- int? curPage,
- int? pageSize,
- int? filterCount,
- List<Map<String, dynamic>>? 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,
- );
- }
- }
|