copyWith method

QualityThresholds copyWith({
  1. BigInt? excellent,
  2. BigInt? great,
  3. BigInt? good,
  4. BigInt? moderate,
  5. BigInt? poor,
})

Returns a new QualityThresholds with overridden values.

  • excellent: Max latency for 'Excellent' (e.g., < 50ms).
  • great: Max latency for 'Great' (e.g., < 100ms).
  • good: Max latency for 'Good' (e.g., < 150ms).
  • moderate: Max latency for 'Moderate' (e.g., < 250ms).
  • poor: Max latency for 'Poor' (e.g., < 500ms).

Implementation

QualityThresholds copyWith({
  BigInt? excellent,
  BigInt? great,
  BigInt? good,
  BigInt? moderate,
  BigInt? poor,
}) {
  return QualityThresholds(
    excellent: excellent ?? this.excellent,
    great: great ?? this.great,
    good: good ?? this.good,
    moderate: moderate ?? this.moderate,
    poor: poor ?? this.poor,
  );
}