defaultValue method

String? defaultValue(
  1. String defautlValue
)

Provide default value if the String is null.

Example

String? foo = null;
foo.ifNull('dont be null'); // returns 'dont be null'

Implementation

String? defaultValue(String defautlValue) {
  if (this != null) {
    return this;
  }
  return defautlValue;
}