isNullOrEmpty static method
Checks if a given value is considered "null" or empty.
Supports null, empty String, and empty List or Map.
Implementation
static bool isNullOrEmpty(dynamic value) {
if (value == null) return true;
if (value is String && value.trim().isEmpty) return true;
if (value is Iterable && value.isEmpty) return true;
if (value is Map && value.isEmpty) return true;
return false;
}