WebViewCookieManager.fromPlatformCreationParams constructor
WebViewCookieManager.fromPlatformCreationParams()
Constructs a WebViewCookieManager from creation params for a specific platform.
Below is an example of setting platform-specific creation parameters for iOS and Android:
PlatformWebViewCookieManagerCreationParams params =
const PlatformWebViewCookieManagerCreationParams();
if (WebViewPlatform.instance is WebKitWebViewPlatform) {
params = WebKitWebViewCookieManagerCreationParams
.fromPlatformWebViewCookieManagerCreationParams(
params,
);
} else if (WebViewPlatform.instance is AndroidWebViewPlatform) {
params = AndroidWebViewCookieManagerCreationParams
.fromPlatformWebViewCookieManagerCreationParams(
params,
);
}
final WebViewCookieManager webViewCookieManager =
WebViewCookieManager.fromPlatformCreationParams(
params,
);
Implementation
WebViewCookieManager.fromPlatformCreationParams(
PlatformWebViewCookieManagerCreationParams params,
) : this.fromPlatform(PlatformWebViewCookieManager(params));