remove method

void remove()

Remove the key/value of the persistent watched variable from the persistent storage, and set it's value to the default.

Won't notify the host to rebuild.

Implementation

void remove() {
  if (_sharedPreferences.containsKey(_persistKey)) {
    // omit await
    _sharedPreferences.remove(_persistKey);
  }
  _value = _defaultValue;
}