toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  Map<String, dynamic> map = {};
  map['name'] = name;
  map['value'] = value;
  if (expires != null) {
    map['expires'] = expires!.toString();
  }
  if (maxAge != null) {
    map['maxAge'] = maxAge!;
  }
  if (domain != null) {
    map['domain'] = domain;
  }
  if (path != null) {
    map['path'] = path;
  }
  map['secure'] = secure;
  map['httpOnly'] = httpOnly;
  if (sameSite != null) {
    map['sameSite'] = sameSite.toString();
  }
  return map;
}