copyWith method
HeadlessBrowserConfig
copyWith({
- String? userAgent,
- bool? javaScriptEnabled,
- bool? domStorageEnabled,
- bool? mixedContentMode,
- bool? cacheEnabled,
- int? timeoutMillis,
- bool? blockImages,
- bool? blockPopups,
- Map<
String, String> ? customHeaders, - bool? clearCookies,
- bool? clearCache,
- bool? ignoreSSLErrors,
- bool? loggingEnabled,
- String? url,
- Map<
String, String> ? headers, - int? timeout,
- bool? waitForNetworkIdle,
- bool? waitForDomContentLoaded,
Creates a copy of this configuration with the given fields replaced
Implementation
HeadlessBrowserConfig copyWith({
String? userAgent,
bool? javaScriptEnabled,
bool? domStorageEnabled,
bool? mixedContentMode,
bool? cacheEnabled,
int? timeoutMillis,
bool? blockImages,
bool? blockPopups,
Map<String, String>? customHeaders,
bool? clearCookies,
bool? clearCache,
bool? ignoreSSLErrors,
bool? loggingEnabled,
String? url,
Map<String, String>? headers,
int? timeout,
bool? waitForNetworkIdle,
bool? waitForDomContentLoaded,
}) {
return HeadlessBrowserConfig(
userAgent: userAgent ?? this.userAgent,
javaScriptEnabled: javaScriptEnabled ?? this.javaScriptEnabled,
domStorageEnabled: domStorageEnabled ?? this.domStorageEnabled,
mixedContentMode: mixedContentMode ?? this.mixedContentMode,
cacheEnabled: cacheEnabled ?? this.cacheEnabled,
timeoutMillis: timeoutMillis ?? this.timeoutMillis,
blockImages: blockImages ?? this.blockImages,
blockPopups: blockPopups ?? this.blockPopups,
customHeaders: customHeaders ?? this.customHeaders,
clearCookies: clearCookies ?? this.clearCookies,
clearCache: clearCache ?? this.clearCache,
ignoreSSLErrors: ignoreSSLErrors ?? this.ignoreSSLErrors,
loggingEnabled: loggingEnabled ?? this.loggingEnabled,
url: url ?? this.url,
headers: headers ?? this.headers,
timeout: timeout ?? this.timeout,
waitForNetworkIdle: waitForNetworkIdle ?? this.waitForNetworkIdle,
waitForDomContentLoaded:
waitForDomContentLoaded ?? this.waitForDomContentLoaded,
);
}