setCookieDelegate method

void setCookieDelegate(
  1. CookieDelegateType type, {
  2. CookieDelegate? originDelegate,
})

Implementation

void setCookieDelegate(CookieDelegateType type, {CookieDelegate? originDelegate}) {
  switch (type) {
    case CookieDelegateType.dio:
      _delegate = _CookieJarDelegateImpl();
      break;
    case CookieDelegateType.native:
      _delegate = _WebviewCookieDelegateImpl();
      break;
    case CookieDelegateType.origin:
      _delegate = originDelegate ?? _CookieJarDelegateImpl();
      break;
  }
}