copyWith method
Returns a copy of this state with updated fields if provided.
Implementation
DoctorDetailsState copyWith({
List<models.Document>? allDoctors,
List<models.Document>? filteredDoctors,
DateTime? fromDate,
DateTime? tillDate,
bool? isLoading,
String? error,
}) {
return DoctorDetailsState(
allDoctors: allDoctors ?? this.allDoctors,
filteredDoctors: filteredDoctors ?? this.filteredDoctors,
fromDate: fromDate ?? this.fromDate,
tillDate: tillDate ?? this.tillDate,
isLoading: isLoading ?? this.isLoading,
error: error,
);
}