ifTokenIsApproachingExpiry method
if user logs in when token is <= 10minutes to expiry return true
Implementation
bool ifTokenIsApproachingExpiry(DateTime parsed) {
final Duration _closeToCurrentTime = DateTime.now().difference(parsed);
// ten minutes (600 seconds)
if (_closeToCurrentTime.inSeconds >= -600) {
return true;
}
return false;
}