copyWith method

ProxyModel copyWith({
  1. String? ip,
  2. int? port,
  3. String? countryCode,
  4. bool? isHttps,
  5. String? anonymityLevel,
  6. String? region,
  7. String? isp,
  8. double? speed,
  9. bool? supportsWebsockets,
  10. ProxyProtocol? protocol,
  11. ProxyAuth? auth,
  12. int? lastChecked,
  13. int? responseTime,
  14. ProxyScore? score,
})

Creates a copy of this ProxyModel with the given parameters

Implementation

ProxyModel copyWith({
  String? ip,
  int? port,
  String? countryCode,
  bool? isHttps,
  String? anonymityLevel,
  String? region,
  String? isp,
  double? speed,
  bool? supportsWebsockets,
  ProxyProtocol? protocol,
  ProxyAuth? auth,
  int? lastChecked,
  int? responseTime,
  ProxyScore? score,
}) {
  return ProxyModel(
    ip: ip ?? this.ip,
    port: port ?? this.port,
    countryCode: countryCode ?? this.countryCode,
    isHttps: isHttps ?? this.isHttps,
    anonymityLevel: anonymityLevel ?? this.anonymityLevel,
    region: region ?? this.region,
    isp: isp ?? this.isp,
    speed: speed ?? this.speed,
    supportsWebsockets: supportsWebsockets ?? this.supportsWebsockets,
    protocol: protocol ?? this.protocol,
    auth: auth ?? this.auth,
    lastChecked: lastChecked ?? this.lastChecked,
    responseTime: responseTime ?? this.responseTime,
    score: score ?? this.score,
  );
}