copyWith method

LxWorkerStat copyWith({
  1. int? runCount,
  2. Duration? lastDuration,
  3. Duration? totalDuration,
  4. DateTime? lastRun,
  5. Object? error,
  6. bool? isAsync,
  7. bool? isProcessing,
})

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,
  );
}