HeadlessBrowserConfig class

Configuration options for the headless browser

Constructors

HeadlessBrowserConfig.new({String? userAgent, bool javaScriptEnabled = true, bool domStorageEnabled = true, bool mixedContentMode = true, bool cacheEnabled = true, int timeoutMillis = 30000, bool blockImages = false, bool blockPopups = true, Map<String, String>? customHeaders, bool clearCookies = false, bool clearCache = false, bool ignoreSSLErrors = false, bool loggingEnabled = kDebugMode, String? url, Map<String, String>? headers, int? timeout, bool waitForNetworkIdle = true, bool waitForDomContentLoaded = true})
Creates a new HeadlessBrowserConfig instance
const
HeadlessBrowserConfig.defaultConfig()
Creates a new HeadlessBrowserConfig instance with default values
factory
HeadlessBrowserConfig.performance()
Creates a new HeadlessBrowserConfig instance optimized for performance
factory
HeadlessBrowserConfig.stealth()
Creates a new HeadlessBrowserConfig instance optimized for stealth
factory

Properties

blockImages bool
Whether to block images from loading
final
blockPopups bool
Whether to block popups
final
cacheEnabled bool
Whether to cache resources
final
clearCache bool
Whether to clear cache before each request
final
clearCookies bool
Whether to clear cookies before each request
final
customHeaders Map<String, String>?
Custom headers to send with requests
final
domStorageEnabled bool
Whether to enable DOM storage
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
Headers to send with the request
final
ignoreSSLErrors bool
Whether to ignore SSL errors
final
javaScriptEnabled bool
Whether to enable JavaScript
final
loggingEnabled bool
Whether to enable logging
final
mixedContentMode bool
Whether to allow mixed content
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout int?
Timeout for the request in milliseconds
final
timeoutMillis int
Timeout for page loading in milliseconds
final
url String?
URL to navigate to
final
userAgent String?
User agent to use for the browser
final
waitForDomContentLoaded bool
Whether to wait for DOM content to be loaded
final
waitForNetworkIdle bool
Whether to wait for network idle
final

Methods

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}) HeadlessBrowserConfig
Creates a copy of this configuration with the given fields replaced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toInAppWebViewSettings() → InAppWebViewSettings
Converts this configuration to InAppWebView settings
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited