getAllCookies method
- @SupportedPlatforms.new(platforms: [IOSPlatform(apiName: 'WKHTTPCookieStore.getAllCookies', apiUrl: 'https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies', available: '11.0'), MacOSPlatform(apiName: 'WKHTTPCookieStore.getAllCookies', apiUrl: 'https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies', available: '10.13'), LinuxPlatform(apiName: 'webkit_cookie_manager_get_all_cookies', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.CookieManager.get_all_cookies.html')])
Fetches all stored cookies.
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.
Implementation
@SupportedPlatforms(
platforms: [
IOSPlatform(
apiName: 'WKHTTPCookieStore.getAllCookies',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies',
available: '11.0',
),
MacOSPlatform(
apiName: 'WKHTTPCookieStore.getAllCookies',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies',
available: '10.13',
),
LinuxPlatform(
apiName: 'webkit_cookie_manager_get_all_cookies',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.CookieManager.get_all_cookies.html',
),
],
)
Future<List<Cookie>> getAllCookies() {
throw UnimplementedError(
'getAllCookies is not implemented on the current platform',
);
}