my_estate_state.dart 795 B

123456789101112131415161718192021222324252627282930313233
  1. import 'package:widgets/load_state_layout.dart';
  2. import 'estate_group_data.dart';
  3. class MyEstateState{
  4. //页面 LoadView 状态的展示
  5. LoadState loadingState;
  6. String? errorMessage;
  7. List<EstateGroupData> datas; //页面列表数据
  8. // =================================== Begin ↓ ===================================
  9. MyEstateState({
  10. this.loadingState = LoadState.State_Loading,
  11. this.errorMessage,
  12. required this.datas,
  13. });
  14. MyEstateState copyWith({
  15. LoadState? loadingState,
  16. String? errorMessage,
  17. bool? needShowPlaceholder,
  18. List<EstateGroupData>? datas,
  19. }) {
  20. return MyEstateState(
  21. errorMessage: errorMessage ?? this.errorMessage,
  22. loadingState: loadingState ?? this.loadingState,
  23. datas: datas ?? this.datas,
  24. );
  25. }
  26. }