deleteCookies method

Future<bool> deleteCookies({
  1. required WebUri url,
  2. String path = "/",
  3. String? domain,
  4. @Deprecated("Use webViewController instead") InAppWebViewController? iosBelow11WebViewController,
  5. InAppWebViewController? webViewController,
})

Removes all cookies for the given url, domain and path.

The default value of path is "/".

The return value indicates whether cookies were deleted successfully.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • url: all platforms
  • path: all platforms
  • domain: all platforms
  • webViewController:
    • macOS WKWebView
    • iOS WKWebView
    • Web <iframe> but requires same origin
    • Windows WebView2

Use the PlatformCookieManager.isMethodSupported method to check if this method is supported at runtime.

Implementation

Future<bool> deleteCookies({
  required WebUri url,
  String path = "/",
  String? domain,
  @Deprecated("Use webViewController instead")
  InAppWebViewController? iosBelow11WebViewController,
  InAppWebViewController? webViewController,
}) => platform.deleteCookies(
  url: url,
  path: path,
  domain: domain,
  iosBelow11WebViewController: iosBelow11WebViewController?.platform,
  webViewController: webViewController?.platform,
);