clearCookies method

  1. @override
Future<bool> clearCookies()

Clears all cookies for all WebView instances.

Returns true if cookies were present before clearing, else false. Soon to be deprecated. 'Use WebViewCookieManagerPlatform.clearCookies instead.

Implementation

@override
Future<bool> clearCookies() {
  if (WebViewCookieManagerPlatform.instance == null) {
    throw Exception(
        'Could not clear cookies as no implementation for WebViewCookieManagerPlatform has been registered.');
  }
  return WebViewCookieManagerPlatform.instance!.clearCookies();
}