copyWith method
NetworkConfiguration
copyWith({
- List<
NetworkTarget> ? targets, - BigInt? checkIntervalMs,
- BigInt? cacheValidityMs,
- QualityThresholds? qualityThreshold,
- SecurityConfig? security,
- ResilienceConfig? resilience,
Creates a copy of the current configuration with updated fields.
targets: The list of NetworkTarget to monitor.checkIntervalMs: How often to run periodic checks (0 to disable).cacheValidityMs: How long to keep results in memory.qualityThreshold: Custom thresholds for Good/Poor latency.security: VPN and DNS hijacking security preferences.resilience: Settings for Circuit Breaker and stability analysis.
Implementation
NetworkConfiguration copyWith({
List<NetworkTarget>? targets,
BigInt? checkIntervalMs,
BigInt? cacheValidityMs,
QualityThresholds? qualityThreshold,
SecurityConfig? security,
ResilienceConfig? resilience,
}) {
return NetworkConfiguration(
targets: targets ?? this.targets,
checkIntervalMs: checkIntervalMs ?? this.checkIntervalMs,
cacheValidityMs: cacheValidityMs ?? this.cacheValidityMs,
qualityThreshold: qualityThreshold ?? this.qualityThreshold,
security: security ?? this.security,
resilience: resilience ?? this.resilience,
);
}