checkExpireValidity method

bool checkExpireValidity(
  1. String? expireAt
)

checkExpireValidity for checking whether the expire time is valid. Recommended to be called just before the app draws its first widget in main.dart

Implementation

bool checkExpireValidity(String? expireAt) {
  final DateTime _parsed = DateTime.parse(expireAt!);
  if (this.ifTokenIsAfterExpiry(_parsed) == true ||
      this.ifTokenIsApproachingExpiry(_parsed) == true) {
    return false;
  }
  return true;
}