isEmpty static method

bool isEmpty(
  1. dynamic value
)

is null or empty for Map, String, Iterable

Implementation

static bool isEmpty(dynamic value) {
  if (value == null) return true;

  if (value is String) return value.isEmpty;
  if (value is Iterable) return value.isEmpty;
  if (value is Map) return value.isEmpty;

  return false;
}