getStringOr static method

String? getStringOr(
  1. String key,
  2. String def
)

return String by key if exists else return def value

Implementation

static String? getStringOr(
  String key,
  String def,
) =>
    getStringOrNull(key) ?? def;