copyWith method
Returns a new Configuration object which differs only in the specified values from this object.
Implementation
Configuration copyWith({
String? apiKey,
Set<Node>? nodes,
Node? nearestNode,
int? numRetries,
Duration? retryInterval,
Duration? connectionTimeout,
Duration? healthcheckInterval,
Duration? cachedSearchResultsTTL,
bool? sendApiKeyAsQueryParam,
}) =>
Configuration(
apiKey ?? this.apiKey,
nodes: nodes ?? this.nodes,
nearestNode: nearestNode ?? this.nearestNode,
numRetries: numRetries ?? this.numRetries,
retryInterval: retryInterval ?? this.retryInterval,
connectionTimeout: connectionTimeout ?? this.connectionTimeout,
healthcheckInterval: healthcheckInterval ?? this.healthcheckInterval,
cachedSearchResultsTTL:
cachedSearchResultsTTL ?? this.cachedSearchResultsTTL,
sendApiKeyAsQueryParam:
sendApiKeyAsQueryParam ?? this.sendApiKeyAsQueryParam,
);