PlatformCookieManagerMethod enum
List of PlatformCookieManager's methods that can be used to check if they are supported or not by the current platform.
Values
- deleteAllCookies → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.deleteAllCookies method is supported at runtime.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CookieManager.removeAllCookies)
- iOS WKWebView 11.0+ (Official API - WKWebsiteDataStore.removeData):
- It will return always
true.
- It will return always
- macOS WKWebView 10.13+ (Official API - WKWebsiteDataStore.removeData):
- It will return always
true.
- It will return always
- Windows WebView2
- Linux WPE WebKit (Official API - webkit_website_data_manager_clear):
- Uses WebsiteDataManager to clear all cookie data.
Use the PlatformCookieManager.isMethodSupported method to check if this method is supported at runtime.
- deleteCookie → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.deleteCookie method is supported at runtime.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CookieManager.getCookie)
- iOS WKWebView (Official API - WKHTTPCookieStore.delete):
- On iOS below 11.0, the
webViewControlleris used for deleting the cookie (also session-only cookie) using JavaScript (cookie withisHttpOnlyenabled cannot be deleted, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to delete the cookie (session-only cookie and cookie withisHttpOnlyenabled won't be deleted!). In this case, this method will return alwaystrue.
- On iOS below 11.0, the
- macOS WKWebView (Official API - WKHTTPCookieStore.delete):
- On macOS below 10.13, the
webViewControlleris used for deleting the cookie (also session-only cookie) using JavaScript (cookie withisHttpOnlyenabled cannot be deleted, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to delete the cookie (session-only cookie and cookie withisHttpOnlyenabled won't be deleted!). In this case, this method will return alwaystrue.
- On macOS below 10.13, the
- Web <iframe> but requires same origin:
- The
webViewControlleris used for deleting the cookie (also session-only cookie) using JavaScript (cookie withisHttpOnlyenabled cannot be deleted, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to delete the cookie (session-only cookie and cookie withisHttpOnlyenabled won't be deleted!). In this case, this method will return alwaystrue.
- The
- Windows WebView2:
- The
webViewControllercould be used to access cookies accessible only on the WebView managed by that controller, such as cookie with partition key.
- The
- Linux WPE WebKit (Official API - webkit_cookie_manager_delete_cookie)
Parameters - Officially Supported Platforms/Implementations:
url: all platforms- name: all platforms
path: all platformsdomain: all platformswebViewController:- 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.
- deleteCookies → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.deleteCookies method is supported at runtime.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CookieManager.getCookie)
- iOS WKWebView (Official API - WKHTTPCookieStore.delete):
- On iOS below 11.0, the
webViewControlleris used for deleting the cookies (also session-only cookies) using JavaScript (cookies withisHttpOnlyenabled cannot be deleted, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to delete the cookies (session-only cookies and cookies withisHttpOnlyenabled won't be deleted!). In this case, this method will return alwaystrue.
- On iOS below 11.0, the
- macOS WKWebView (Official API - WKHTTPCookieStore.delete):
- On macOS below 10.13, the
webViewControlleris used for deleting the cookies (also session-only cookies) using JavaScript (cookies withisHttpOnlyenabled cannot be deleted, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to delete the cookies (session-only cookies and cookies withisHttpOnlyenabled won't be deleted!). In this case, this method will return alwaystrue.
- On macOS below 10.13, the
- Web <iframe> but requires same origin:
- The
webViewControlleris used for deleting the cookies (also session-only cookies) using JavaScript (cookies withisHttpOnlyenabled cannot be deleted, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to delete the cookies (session-only cookies and cookies withisHttpOnlyenabled won't be deleted!). In this case, this method will return alwaystrue.
- The
- Windows WebView2:
- The
webViewControllercould be used to access cookies accessible only on the WebView managed by that controller, such as cookie with partition key.
- The
- Linux WPE WebKit (Official API - webkit_cookie_manager_delete_cookie)
Parameters - Officially Supported Platforms/Implementations:
url: all platformspath: all platformsdomain: all platformswebViewController:- 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.
- flush → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.flush method is supported at runtime.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CookieManager.flush)
Use the PlatformCookieManager.isMethodSupported method to check if this method is supported at runtime.
- getAllCookies → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.getAllCookies method is supported at runtime.
Officially Supported Platforms/Implementations:
- iOS WKWebView 11.0+ (Official API - WKHTTPCookieStore.getAllCookies)
- macOS WKWebView 10.13+ (Official API - WKHTTPCookieStore.getAllCookies)
- Linux WPE WebKit (Official API - webkit_cookie_manager_get_all_cookies)
Use the PlatformCookieManager.isMethodSupported method to check if this method is supported at runtime.
- getCookie → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.getCookie method is supported at runtime.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CookieManager.getCookie)
- iOS WKWebView (Official API - WKHTTPCookieStore.getAllCookies):
- On iOS below 11.0, the
webViewControlleris used for getting the cookie (also session-only cookie) using JavaScript (cookie withisHttpOnlyenabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. All the cookies returned this way will have all the properties tonullexcept for Cookie.name and Cookie.value. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to get the cookie (session-only cookie and cookie withisHttpOnlyenabled won't be found!).
- On iOS below 11.0, the
- macOS WKWebView (Official API - WKHTTPCookieStore.getAllCookies):
- On macOS below 10.13, the
webViewControlleris used for getting the cookie (also session-only cookie) using JavaScript (cookie withisHttpOnlyenabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. All the cookies returned this way will have all the properties tonullexcept for Cookie.name and Cookie.value. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to get the cookie (session-only cookie and cookie withisHttpOnlyenabled won't be found!).
- On macOS below 10.13, the
- Web <iframe> but requires same origin:
- The
webViewControlleris used for getting the cookie (also session-only cookie) using JavaScript (cookie withisHttpOnlyenabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to get the cookie (session-only cookie and cookie withisHttpOnlyenabled won't be found!).
- The
- Windows WebView2:
- The
webViewControllercould be used to access cookies accessible only on the WebView managed by that controller, such as cookie with partition key.
- The
- Linux WPE WebKit (Official API - webkit_cookie_manager_get_cookies)
Parameters - Officially Supported Platforms/Implementations:
url: all platforms- name: 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.
- getCookies → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.getCookies method is supported at runtime.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CookieManager.getCookie)
- iOS WKWebView (Official API - WKHTTPCookieStore.getAllCookies):
- On iOS below 11.0, the
webViewControlleris used for getting the cookies (also session-only cookies) using JavaScript (cookies withisHttpOnlyenabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. All the cookies returned this way will have all the properties tonullexcept for Cookie.name and Cookie.value. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to get the cookies (session-only cookies and cookies withisHttpOnlyenabled won't be found!).
- On iOS below 11.0, the
- macOS WKWebView (Official API - WKHTTPCookieStore.getAllCookies):
- On macOS below 10.13, the
webViewControlleris used for getting the cookies (also session-only cookies) using JavaScript (cookies withisHttpOnlyenabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. All the cookies returned this way will have all the properties tonullexcept for Cookie.name and Cookie.value. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to get the cookies (session-only cookies and cookies withisHttpOnlyenabled won't be found!).
- On macOS below 10.13, the
- Web <iframe> but requires same origin:
- The
webViewControlleris used for getting the cookies (also session-only cookies) using JavaScript (cookies withisHttpOnlyenabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) from the current context of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. In this case theurlparameter is ignored. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to get the cookies (session-only cookies and cookies withisHttpOnlyenabled won't be found!).
- The
- Windows WebView2:
- The
webViewControllercould be used to access cookies accessible only on the WebView managed by that controller, such as cookie with partition key.
- The
- Linux WPE WebKit (Official API - webkit_cookie_manager_get_cookies)
Parameters - Officially Supported Platforms/Implementations:
url: all platformswebViewController:- 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.
- removeSessionCookies → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.removeSessionCookies method is supported at runtime.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CookieManager.removeSessionCookies)
Use the PlatformCookieManager.isMethodSupported method to check if this method is supported at runtime.
- setCookie → const PlatformCookieManagerMethod
-
Can be used to check if the PlatformCookieManager.setCookie method is supported at runtime.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CookieManager.setCookie)
- iOS WKWebView (Official API - WKHTTPCookieStore.setCookie):
- On iOS below 11.0, the
webViewControllercould be used if you need to set a session-only cookie using JavaScript (soisHttpOnlycannot be set, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) on the current URL of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to set the cookie (session-only cookie won't work! In that case, you should set alsoexpiresDateormaxAge). In this case, this method will return alwaystrue.
- On iOS below 11.0, the
- macOS WKWebView (Official API - WKHTTPCookieStore.setCookie):
- On macOS below 10.13, the
webViewControllercould be used if you need to set a session-only cookie using JavaScript (soisHttpOnlycannot be set, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) on the current URL of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to set the cookie (session-only cookie won't work! In that case, you should set alsoexpiresDateormaxAge). In this case, this method will return alwaystrue.
- On macOS below 10.13, the
- Web <iframe> but requires same origin:
- The
webViewControllercould be used if you need to set a session-only cookie using JavaScript (soisHttpOnlycannot be set, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) on the current URL of theWebViewmanaged by that controller. JavaScript must be enabled in order to work. IfwebViewControllerisnullor JavaScript is disabled for it, it will try to use a PlatformHeadlessInAppWebView to set the cookie (session-only cookie won't work! In that case, you should set alsoexpiresDateormaxAge). In this case, this method will return alwaystrue.
- The
- Windows WebView2:
- The
webViewControllercould be used to access cookies accessible only on the WebView managed by that controller, such as cookie with partition key.
- The
- Linux WPE WebKit (Official API - webkit_cookie_manager_add_cookie)
Parameters - Officially Supported Platforms/Implementations:
url: all platforms- name: all platforms
value: all platformspath: all platformsdomain: all platformsexpiresDate: all platformsmaxAge: all platformsisSecure: all platformsisHttpOnly: all platformssameSite: all platformswebViewController:- 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.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
PlatformCookieManagerMethod> - A constant List of the values in this enum, in order of their declaration.