not method

  1. @Deprecated('Use snapshot() and handle null results instead')
TTLink not(
  1. void cb(
    1. String key
    )
)

Register a callback for when it appears a record does not exist

If you need to know whether a property or key exists, you can check with .not. It will consult the connected peers and invoke the callback if there's reasonable certainty that none of them have the data available.

@param cb If there's reason to believe the data doesn't exist, the callback will be invoked. This can be used as a check to prevent implicitly writing data @returns same link context

Implementation

@Deprecated('Use snapshot() and handle null results instead')
TTLink not(void Function(String key) cb) {
  promise().then((val) {
    if (isNull(val)) {
      cb(key);
    }
  });
  return this;
}