isTruthy method

bool isTruthy(
  1. Object? object
)

Implementation

bool isTruthy(Object? object) {
  if (object == null) return false;
  if (object is bool) return object;
  return true;
}