ClientCookie.fromMap constructor Null safety

ClientCookie.fromMap(
  1. String name,
  2. String value,
  3. DateTime createdAt,
  4. Map map
)

Receives directives as Map

Implementation

factory ClientCookie.fromMap(
    String name, String value, DateTime createdAt, Map map) {
  return ClientCookie(
    name,
    value,
    createdAt,
    domain: map['Domain'],
    expires: map['Expires'],
    httpOnly: map['HttpOnly'] ?? false,
    maxAge: map['Max-Age'],
    secure: map['Secure'] ?? false,
    path: map['Path'],
  );
}