onTrueOrNull<T> method

T? onTrueOrNull<T>(
  1. T callback, [
  2. T? otherCallBack
])

When true or null this will return call back When false this will return other

Implementation

T? onTrueOrNull<T>(T callback, [T? otherCallBack]) {
  if (this != false) {
    return callback;
  } else {
    return otherCallBack;
  }
}