getOrElse method

String getOrElse(
  1. String key,
  2. String orElse()
)

Equivalent to operator [] when the underlying map contains key, and the value is non-empty. See isDefined.

Otherwise, calls orElse and returns the value.

Implementation

String getOrElse(String key, String Function() orElse) =>
    isDefined(key) ? _map[key]! : orElse();