isEmpty function

bool isEmpty(
  1. Object? object
)

Implementation

bool isEmpty(Object? object) {
  if (object == null) {
    return true;
  }

  if (object is String) {
    return object.isEmpty;
  }

  if (object is Iterable) {
    return object.isEmpty;
  }

  if (object is Map) {
    return object.isEmpty;
  }

  return false;
}