wrapWith method
Extension method to wrap a String with a prefix before
and a suffix after
. Returns null if the string is empty.
Implementation
String? wrapWith({String? before, String? after}) {
if (isEmpty) {
return null;
}
return '${before ?? ""}$this${after ?? ""}';
}