import 'package:domain/entity/facility_book_entity.dart'; import 'package:widgets/load_state_layout.dart'; class FacilityBookingState { //当前选中的时间日期 DateTime selectedDate; //页面 LoadView 状态的展示 LoadState loadingState; String? errorMessage; //网络请求数据 FacilityBookEntity? data; String? facilityId; String? facilityName; int index; int innerIndex; // =================================== Begin ↓ =================================== FacilityBookingState({ required this.selectedDate, this.loadingState = LoadState.State_Loading, this.data, this.errorMessage, this.facilityId, this.facilityName, this.index = 0, this.innerIndex = 0, }); FacilityBookingState copyWith({ DateTime? selectedDate, LoadState? loadingState, String? errorMessage, String? facilityId, String? facilityName, FacilityBookEntity? data, int? index, int? innerIndex, }) { return FacilityBookingState( selectedDate: selectedDate ?? this.selectedDate, loadingState: loadingState ?? this.loadingState, errorMessage: errorMessage ?? this.errorMessage, data: data, facilityId: facilityId ?? this.facilityId, facilityName: facilityName ?? this.facilityName, index: index ?? this.index, innerIndex: innerIndex ?? this.innerIndex, ); } }