copyWith method

WorkStatus copyWith({
  1. WorkPhase? phase,
  2. String? jobId,
  3. String? message,
  4. Object? error,
  5. String? errorStack,
  6. double? completed,
  7. double? total,
  8. double? percentComplete,
  9. Map<String, dynamic>? more,
})

Implementation

WorkStatus copyWith({
  WorkPhase? phase,
  String? jobId,
  String? message,
  Object? error,
  String? errorStack,
  double? completed,
  double? total,
  double? percentComplete,
  Map<String, dynamic>? more,
}) {
  return WorkStatus(
    jobId: jobId ?? this.jobId,
    phase: phase ?? this.phase,
    message: message ?? this.message,
    error: error?.toString() ?? this.error,
    errorStack: errorStack ?? this.errorStack,
    completed: completed ?? this.completed,
    total: total ?? this.total,
    percentComplete: percentComplete ?? this.percentComplete,
    more: more ?? this.more,
  );
}