orDefault method

String orDefault(
  1. String defaultValue
)

Returns string if not null or empty, otherwise defaultValue

Implementation

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