isActive method

bool isActive({
  1. DateTime? now,
})

Whether this record is valid at now.

Implementation

bool isActive({DateTime? now}) {
  final current = (now ?? DateTime.now()).toUtc();
  return revokedAt == null && current.isBefore(expiresAt.toUtc());
}