ttlOf method
Time left before key expires; null when it has no ttl or does not exist.
Implementation
Duration? ttlOf(String key) {
final int? at = _expiry[key];
if (at == null || !has(key)) return null;
return Duration(milliseconds: at - DateTime.now().millisecondsSinceEpoch);
}