isEmpty property

bool get isEmpty

Implementation

bool get isEmpty {
  if (T == bool) {
    return false; // For boolean types, we consider it non-empty.
  }
  if (hasData) {
    // Check for emptiness if T is an iterable.
    return data is Iterable ? (data as Iterable).isEmpty : false;
  }
  return true; // Data is null, so we consider it empty.
}