tryGet<T> method

T? tryGet<T>(
  1. String key, {
  2. ConfigScope? scope,
})

Try to get a value, returning null instead of throwing.

Implementation

T? tryGet<T>(String key, {ConfigScope? scope}) {
  try {
    return get<T>(key, scope: scope);
  } catch (_) {
    return null;
  }
}