expireAfter method
토큰 만료 시간 설정
지정된 시간 후에 토큰이 만료됩니다.
mock.expireAfter(Duration(seconds: 30));
// 30초 후 mock.isExpired == true
Implementation
void expireAfter(Duration duration) {
_expiresAt = DateTime.now().add(duration);
}
토큰 만료 시간 설정
지정된 시간 후에 토큰이 만료됩니다.
mock.expireAfter(Duration(seconds: 30));
// 30초 후 mock.isExpired == true
void expireAfter(Duration duration) {
_expiresAt = DateTime.now().add(duration);
}