Open kghoon opened 1 year ago
bool isValid() { if (expiresAt.isEmpty || expiresAt == 'no token') return false; bool timeValid = Clock.now().isBefore(DateTime.parse(expiresAt)); bool tokenExist = accessToken.isNotEmpty && accessToken != 'no token'; return timeValid && tokenExist; }
DateTime.fromMillisecondsSinceEpoch(int.parse(expiresAt) * 1000)