onTrue<T> method
T?
onTrue<T>(
- T callback, [
- T? otherCallBack
When true this will return call back When false or null this will return other
Implementation
T? onTrue<T>(T callback, [T? otherCallBack]) {
if (this == true) {
return callback;
} else {
return otherCallBack;
}
}