facility_booking_state.dart 893 B

123456789101112131415161718192021222324252627282930313233343536
  1. import 'package:widgets/load_state_layout.dart';
  2. class FacilityBookingState {
  3. //当前选中的时间日期
  4. DateTime selectedDate;
  5. //页面 LoadView 状态的展示
  6. LoadState loadingState;
  7. String? errorMessage;
  8. List<String> datas;
  9. // =================================== Begin ↓ ===================================
  10. FacilityBookingState({
  11. required this.selectedDate,
  12. this.loadingState = LoadState.State_Loading,
  13. required this.datas,
  14. this.errorMessage,
  15. });
  16. FacilityBookingState copyWith({
  17. DateTime? selectedDate,
  18. LoadState? loadingState,
  19. String? errorMessage,
  20. List<String>? datas,
  21. }) {
  22. return FacilityBookingState(
  23. selectedDate: selectedDate ?? this.selectedDate,
  24. loadingState: loadingState ?? this.loadingState,
  25. errorMessage: errorMessage ?? this.errorMessage,
  26. datas: datas ?? this.datas,
  27. );
  28. }
  29. }