nullIfEmpty method

String? nullIfEmpty()

Implementation

String? nullIfEmpty() => (this ?? "").isEmpty ? null : this;