get method

ClientCookie? get(
  1. String name
)

Returns a cookie by name

Returns null if cookie with name is not present

Implementation

ClientCookie? get(String name) {
  if (!cookieMap.containsKey(name)) return null;

  final ret = cookieMap[name]!;

  // Remove expired cookie
  if (ret.hasExpired) {
    cookieMap.remove(name);
    return null;
  }

  return ret;
}