copyWith method
Create a copy of this TaskStats with some properties changed
Implementation
TaskStats copyWith({
String? name,
DateTime? lastRun,
DateTime? nextRun,
int? successCount,
int? failureCount,
double? averageExecutionTime,
TaskStatus? status,
}) {
return TaskStats(
name: name ?? this.name,
lastRun: lastRun ?? this.lastRun,
nextRun: nextRun ?? this.nextRun,
successCount: successCount ?? this.successCount,
failureCount: failureCount ?? this.failureCount,
averageExecutionTime: averageExecutionTime ?? this.averageExecutionTime,
status: status ?? this.status,
);
}