value method

String? value(
  1. String key, {
  2. String? def,
})

Implementation

String? value(String key, {String? def}) {
  var config = pickedConfig;
  if (config == null) {
    return def;
  } else {
    try {
      return config.subItems
          ?.firstWhere(
            (element) => element.name == key,
          )
          .value;
    } catch (e) {
      return def;
    }
  }
}