copyWith method

NetworkConfiguration copyWith({
  1. List<NetworkTarget>? targets,
  2. BigInt? checkIntervalMs,
  3. BigInt? cacheValidityMs,
  4. QualityThresholds? qualityThreshold,
  5. SecurityConfig? security,
  6. ResilienceConfig? resilience,
})

Creates a copy of NetworkConfiguration with the given fields replaced by the new values.

targets Optional list of NetworkTarget to update. checkIntervalMs Optional interval between checks to update. cacheValidityMs Optional cache duration to update. qualityThreshold Optional QualityThresholds to update. security Optional SecurityConfig to update. resilience Optional ResilienceConfig to update.

Returns a new NetworkConfiguration instance.

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,
  );
}