get<T> method

T? get<T>(
  1. String key, [
  2. T? defaultValue
])

Gets a value from the DynamicConfig

Uses the given key to fetch a value from the DynamicConfig if it exists. If no value for the given key is found, the defaultValue is returned.

Implementation

T? get<T>(String key, [T? defaultValue]) {
  return value[key] ?? defaultValue;
}