isNullOrBlank property

bool isNullOrBlank

Implementation

bool get isNullOrBlank {
  if (this == null) return true;
  switch (this.runtimeType) {
    case String:
      return this.trim().isEmpty;
    case List:
    case Map:
    case Set:
    case Iterable:
      return this.isEmpty;
    default:
      return this.toString() == 'null' || this.toString().trim().isEmpty;
  }
}