copyWith method
Creates a copy of the statistics with updated fields.
Implementation
LxWorkerStat copyWith({
int? runCount,
Duration? lastDuration,
Duration? totalDuration,
DateTime? lastRun,
Object? error,
bool? isAsync,
bool? isProcessing,
}) {
return LxWorkerStat(
runCount: runCount ?? this.runCount,
lastDuration: lastDuration ?? this.lastDuration,
totalDuration: totalDuration ?? this.totalDuration,
lastRun: lastRun ?? this.lastRun,
error: error ?? this.error,
isAsync: isAsync ?? this.isAsync,
isProcessing: isProcessing ?? this.isProcessing,
);
}