nullIfEmpty property
String?
get
nullIfEmpty
If the string is empty, return null. Otherwise, return the string.
Implementation
String? get nullIfEmpty => isEmpty ? null : this;
If the string is empty, return null. Otherwise, return the string.
String? get nullIfEmpty => isEmpty ? null : this;