QualityService class
端到端网络质量评估服务 / End-to-end network quality assessment service.
依次采集连接信息、延迟、DNS 与带宽指标后交给 NetworkQualityEvaluator 打分 / Collects connectivity, latency, DNS and bandwidth metrics and feeds them to NetworkQualityEvaluator.
Constructors
- QualityService({ConnectivityService? connectivityService, PingService? pingService, DnsService? dnsService, SpeedTestService? speedTestService})
- 构造 QualityService / Creates a QualityService.
Properties
- connectivity → ConnectivityService
-
连通性服务 / Connectivity service.
final
- dns → DnsService
-
DNS 服务 / DNS service.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- ping → PingService
-
延迟服务 / Latency service.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speedTest → SpeedTestService
-
带宽服务 / Bandwidth service.
final
Methods
-
evaluateQuality(
{NetworkDiagnosticConfig config = const NetworkDiagnosticConfig(), bool includePing = true, bool includeDns = true, bool includeSpeedTest = true, bool includeUpload = true, String? pingHost, int? pingCount, Duration? pingTimeout, String? dnsDomain, List< String> ? dnsServers, Duration? dnsTimeout, String? downloadUrl, String? uploadUrl}) → Future<NetworkQualityScore> - 评估当前网络质量 / Evaluates the current network quality.
-
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.
inherited