updateRaw method

bool updateRaw(
  1. Map<String, dynamic> json
)

Attempts to parse json into T using decoder and updates the node value.

  • Returns true if the config was successfully decoded and updated.
  • Returns false if decoding throws an exception (value remains untouched).

Implementation

bool updateRaw(Map<String, dynamic> json) {
  try {
    final newConfig = decoder(json);
    set(newConfig);
    return true;
  } catch (_) {
    return false;
  }
}