onActiveOrNull<T> method
T?
onActiveOrNull<T>(
- T callback
return T
when timer is still active or is null else return null
Implementation
T? onActiveOrNull<T>(T callback) {
if (isActive) {
return callback;
} else {
return null;
}
}