isValid method Null safety

bool isValid()

Implementation

bool isValid() {
  return ttl >= DateTime.now().difference(ctime).inSeconds;
}