nullIfWhitespace property

String? nullIfWhitespace

Returns null if this string is whitespace.

Implementation

String? get nullIfWhitespace => trim().isEmpty ? null : this;