refreshNeeded method
Checks if the access token must be refreeshed
Implementation
bool refreshNeeded({secondsToExpiration = 30}) {
var needsRefresh = false;
if (expirationDate != null) {
var now = DateTime.now();
needsRefresh =
expirationDate!.difference(now).inSeconds < secondsToExpiration;
}
return needsRefresh;
}