orDefault method

String orDefault(
  1. String defaultValue
)

如果为 null 或空,返回默认值

Implementation

String orDefault(String defaultValue) => isNullOrEmpty ? defaultValue : this!;