isExpired method
Implementation
bool isExpired() {
final now = DateTime.now();
return (cookie.maxAge != null && cookie.maxAge! < 1) ||
(cookie.maxAge != null &&
(now.millisecondsSinceEpoch ~/ 1000).toInt() - creation >=
cookie.maxAge!) ||
(cookie.expires != null && !cookie.expires!.isAfter(now));
}