set static method

bool set(
  1. String key,
  2. Object? value, {
  3. Object? options,
})

Implementation

static bool set(String key, Object? value, {Object? options}) {
  try {
    _ii._props[key] = value;
    if (_ii._local) return true;
    return _execute((i) {
      final request = SettingsWriteRequest._(
        path: key,
        value: value,
        type: value.dataType,
        props: _ii._props,
        options: options,
      );
      final feedback = _ii._cached?.write(request);
      _ii._backup?.write(request);
      return feedback ?? _ii._cached == null;
    });
  } catch (msg) {
    _log(msg);
    return false;
  }
}