nullIfBlank property

String? get nullIfBlank

If the string is blank (null, empty, or consists only of whitespace), return null. Otherwise, return the string. Alias for isEmptyOrNull.

Implementation

String? get nullIfBlank => isBlank ? null : this;