nullIfEmpty property

String? get nullIfEmpty

Returns null if the String is empty, otherwise returns the String.

Implementation

String? get nullIfEmpty {
  return isEmpty ? null : this;
}