checkValidStringWithToDisplayCase function

dynamic checkValidStringWithToDisplayCase(
  1. String? value
)

Implementation

checkValidStringWithToDisplayCase (String? value) {
  if (value == null || value == "null" || value == "<null>")
  {
    value = "";
  }
  else if (value.isEmpty)
  {
    value = "--";
  }

  if(value.isEmpty || value == "--")
    {
      return value.trim();
    }
  else
    {
      return toDisplayCase(value.trim());
    }
}