fromMap static method

Cookie? fromMap(
  1. Map<String, dynamic>? map
)

Gets a possible Cookie instance from a Map value.

Implementation

static Cookie? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = Cookie(
    domain: map['domain'],
    expiresDate: map['expiresDate'],
    isHttpOnly: map['isHttpOnly'],
    isSecure: map['isSecure'],
    isSessionOnly: map['isSessionOnly'],
    name: map['name'],
    path: map['path'],
    sameSite: HTTPCookieSameSitePolicy.fromNativeValue(map['sameSite']),
    value: map['value'],
  );
  return instance;
}