orDefaultIfBlank method

String orDefaultIfBlank(
  1. String defaultValue
)

Returns string if not null or blank, otherwise defaultValue

Implementation

String orDefaultIfBlank(String defaultValue) {
  return (this != null && this!.trim().isNotEmpty) ? this! : defaultValue;
}