orProvider method

String orProvider(
  1. StringProvider defaultValueProvider
)

Gets the same string if it is not null or empty. Otherwise it evaluates and returns the specified default value provider.

It is evaluated and returned if this string is null or empty.

Implementation

String orProvider(StringProvider defaultValueProvider) {
  return isEmptyOrNull ? defaultValueProvider() : this!;
}