isExpired method

bool isExpired()

Checks if the access token is expired

Implementation

bool isExpired() {
  var expired = false;

  if (expirationDate != null) {
    var now = DateTime.now();
    expired = expirationDate!.difference(now).inSeconds < 0;
  }

  return expired;
}