deleteAllCookies method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'CookieManager.removeAllCookies', apiUrl: 'https://developer.android.com/reference/android/webkit/CookieManager#removeAllCookies(android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)'), IOSPlatform(apiName: 'WKWebsiteDataStore.removeData', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata', available: '11.0', note: """It will return always `true`."""), MacOSPlatform(apiName: 'WKWebsiteDataStore.removeData', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata', available: '10.13', note: """It will return always `true`."""), WindowsPlatform(), LinuxPlatform(apiName: 'webkit_website_data_manager_clear', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebsiteDataManager.clear.html', note: 'Uses WebsiteDataManager to clear all cookie data.')])
Future<bool> deleteAllCookies()

Removes all cookies.

The return value indicates whether any cookies were removed.

Officially Supported Platforms/Implementations:

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'CookieManager.removeAllCookies',
      apiUrl:
          'https://developer.android.com/reference/android/webkit/CookieManager#removeAllCookies(android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)',
    ),
    IOSPlatform(
      apiName: 'WKWebsiteDataStore.removeData',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata',
      available: '11.0',
      note: """It will return always `true`.""",
    ),
    MacOSPlatform(
      apiName: 'WKWebsiteDataStore.removeData',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata',
      available: '10.13',
      note: """It will return always `true`.""",
    ),
    WindowsPlatform(),
    LinuxPlatform(
      apiName: 'webkit_website_data_manager_clear',
      apiUrl:
          'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebsiteDataManager.clear.html',
      note: 'Uses WebsiteDataManager to clear all cookie data.',
    ),
  ],
)
Future<bool> deleteAllCookies() {
  throw UnimplementedError(
    'deleteAllCookies is not implemented on the current platform',
  );
}