isNullOrBlank method

bool isNullOrBlank()

Implementation

bool isNullOrBlank() {
  if (this == null) return true;
  if (this is String) return (this as String).isEmpty;
  if (this is Iterable) return (this as Iterable).isEmpty;
  if (this is Map) return (this as Map).isEmpty;
  if (this is num && this is! bool) return (this as num) == 0;
  return false;
}