copyWith method
BackgroundJob
copyWith(
{ - int? id,
- String? jobKey,
- Map<String, dynamic>? payload,
- BackgroundJobStatus? status,
- int? attempts,
- int? maxAttempts,
- DateTime? lastAttemptAt,
- String? lastError,
- int? priority,
- DateTime? createdAt,
- DateTime? updatedAt,
})
Implementation
BackgroundJob copyWith({
int? id,
String? jobKey,
Map<String, dynamic>? payload,
BackgroundJobStatus? status,
int? attempts,
int? maxAttempts,
DateTime? lastAttemptAt,
String? lastError,
int? priority,
DateTime? createdAt,
DateTime? updatedAt,
}) {
return BackgroundJob(
id: id ?? this.id,
jobKey: jobKey ?? this.jobKey,
payload: payload ?? this.payload,
status: status ?? this.status,
attempts: attempts ?? this.attempts,
maxAttempts: maxAttempts ?? this.maxAttempts,
lastAttemptAt: lastAttemptAt ?? this.lastAttemptAt,
lastError: lastError ?? this.lastError,
priority: priority ?? this.priority,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
);
}