facility_book_state.dart 898 B

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