set<T> method

void set<T>(
  1. String key,
  2. T value, {
  3. ConfigScope scope = ConfigScope.session,
})

Set a typed value for key in the given scope (defaults to session).

Implementation

void set<T>(String key, T value, {ConfigScope scope = ConfigScope.session}) {
  final old = tryGet<T>(key, scope: scope);
  _store[scope]![key] = value;
  _sources[scope]![key] = ConfigSource.cli;
  _emitChange(key, old, value, scope);
}