getRemainingTime static method
Returns remaining time until expiry date.
Implementation
static Duration? getRemainingTime(String token) {
final expirationDate = getExpirationDate(token);
if (expirationDate == null) {
return null;
}
return expirationDate.difference(DateTime.now());
}