isExpired static method
Returns false if the token is valid, true if it is expired.
Implementation
static bool isExpired(String token) {
final expirationDate = getExpirationDate(token);
if (expirationDate == null) {
return false;
}
return DateTime.now().isAfter(expirationDate);
}