replaceString static method

String replaceString(
  1. String? text, {
  2. String defaultValue = "",
})

colesce string?

Implementation

static String replaceString(String? text, {String defaultValue = ""}) {
  if ((text ?? "").isEmpty) return defaultValue;
  return text!;
}