toStringWithDefault static method
Converts value into string or returns default when value is null.
value
the value to convert.- defaultValue the default value. Returns string value or default when value is null.
See toNullableString
Implementation
static String toStringWithDefault(value, String defaultValue) {
var result = StringConverter.toNullableString(value);
return result ?? defaultValue;
}