copyWith method

DocumentUploadState copyWith({
  1. DocumentVerificationType? verificationType,
  2. File? selectedImage,
  3. bool? isUploading,
  4. bool? isWaitingForWebSocket,
  5. double? currentProgress,
  6. bool? documentRejected,
  7. String? rejectionMessage,
})

Implementation

DocumentUploadState copyWith({
  DocumentVerificationType? verificationType,
  File? selectedImage,
  bool? isUploading,
  bool? isWaitingForWebSocket,
  double? currentProgress,
  bool? documentRejected,
  String? rejectionMessage,
}) {
  return DocumentUploadState(
    verificationType: verificationType ?? this.verificationType,
    selectedImage: selectedImage ?? this.selectedImage,
    isUploading: isUploading ?? this.isUploading,
    isWaitingForWebSocket: isWaitingForWebSocket ?? this.isWaitingForWebSocket,
    currentProgress: currentProgress ?? this.currentProgress,
    documentRejected: documentRejected ?? this.documentRejected,
    rejectionMessage: rejectionMessage ?? this.rejectionMessage,
  );
}