defaultString static method

String defaultString(
  1. String? str, {
  2. String defaultStr = '',
})

Returns the given string or the default string if the given string is null

Implementation

static String defaultString(String? str, {String defaultStr = ''}) {
  return str ?? defaultStr;
}