copyWith method

YOLOPerformanceMetrics copyWith({
  1. double? fps,
  2. double? processingTimeMs,
  3. int? frameNumber,
  4. DateTime? timestamp,
})

Creates a copy with modified values.

Any parameter not specified will retain its current value.

Implementation

YOLOPerformanceMetrics copyWith({
  double? fps,
  double? processingTimeMs,
  int? frameNumber,
  DateTime? timestamp,
}) {
  return YOLOPerformanceMetrics(
    fps: fps ?? this.fps,
    processingTimeMs: processingTimeMs ?? this.processingTimeMs,
    frameNumber: frameNumber ?? this.frameNumber,
    timestamp: timestamp ?? this.timestamp,
  );
}