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