getCookies method

Future<List<Cookie>> getCookies({
  1. required WebUri url,
  2. @Deprecated("Use webViewController instead") InAppWebViewController? iosBelow11WebViewController,
  3. InAppWebViewController? webViewController,
})

Gets all the cookies for the given url.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • url: 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<List<Cookie>> getCookies({
  required WebUri url,
  @Deprecated("Use webViewController instead")
  InAppWebViewController? iosBelow11WebViewController,
  InAppWebViewController? webViewController,
}) => platform.getCookies(
  url: url,
  iosBelow11WebViewController: iosBelow11WebViewController?.platform,
  webViewController: webViewController?.platform,
);