QualityThresholds class

Defines the latency thresholds (in milliseconds) used to categorize `ConnectionQuality`.

These values act as the "buckets" that convert raw Round-Trip Time (RTT) values into user-friendly quality ratings.

Available extensions

Constructors

QualityThresholds({required BigInt excellent, required BigInt great, required BigInt good, required BigInt moderate, required BigInt poor})
const

Properties

excellent BigInt
Maximum latency (ms) to be considered `ConnectionQuality::Excellent`. Default: 50ms
final
good BigInt
Maximum latency (ms) to be considered `ConnectionQuality::Good`. Default: 150ms
final
great BigInt
Maximum latency (ms) to be considered `ConnectionQuality::Great`. Default: 100ms
final
hashCode int
The hash code for this object.
no setteroverride
moderate BigInt
Maximum latency (ms) to be considered `ConnectionQuality::Moderate`. Default: 250ms
final
poor BigInt
Maximum latency (ms) to be considered `ConnectionQuality::Poor`. Anything above this is typically marked as `ConnectionQuality::Poor` or `ConnectionQuality::Unstable`. Default: 500ms
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({BigInt? excellent, BigInt? great, BigInt? good, BigInt? moderate, BigInt? poor}) QualityThresholds

Available on QualityThresholds, provided by the QualityThresholdsCopyWith extension

Returns a new QualityThresholds with overridden values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

default_() Future<QualityThresholds>
Provides industry-standard default latency thresholds for most applications.
newInstance({required BigInt excellent, required BigInt great, required BigInt good, required BigInt moderate, required BigInt poor}) Future<QualityThresholds>
Creates a new custom `QualityThresholds` instance.