delete method
Delete cookies for specified uri.
This API will delete all cookies for the uri.host, it will ignored the uri.path.
withDomainSharedCookie true will delete the domain-shared cookies.
Implementation
@override
Future<void> delete(Uri uri, [bool withDomainSharedCookie = false]) async {
await _checkInitialized();
await super.delete(uri, withDomainSharedCookie);
final host = uri.host;
if (_hostSet.remove(host)) {
await storage.write(_indexKey, json.encode(_hostSet.toList()));
}
await storage.delete(host);
if (withDomainSharedCookie) {
await storage.write(_domainsKey, json.encode(domainCookies));
}
}