Cookie.fromJson constructor
Implementation
factory Cookie.fromJson(Map<String, dynamic> json) {
DateTime? expiry;
if (json['expiry'] is num) {
expiry = DateTime.fromMillisecondsSinceEpoch(
(json['expiry'] as num).toInt() * 1000,
isUtc: true,
);
}
return Cookie(
json['name'] as String?,
json['value'] as String?,
path: json['path'] as String?,
domain: json['domain'] as String?,
secure: json['secure'] as bool?,
expiry: expiry,
);
}