hasValue function

bool hasValue(
  1. Object? obj
)

Check if obj has value (isn't null or empty).

Implementation

bool hasValue(Object? obj) {
  if (obj is Iterable) {
    return obj.isNotEmpty;
  }
  return obj != null && obj.toString().isNotEmpty;
}