orNull property

String? get orNull

Coerces blank strings to null. Symmetric with StringX.blankToNull.

Implementation

String? get orNull => (this == null || this!.trim().isEmpty) ? null : this;