watch method

RealtimeListener watch({
  1. required void onChange(
    1. Snapshot snapshot
    ),
  2. required void onError(
    1. dynamic error
    ),
})

Implementation

RealtimeListener watch({
  required void onChange(Snapshot snapshot),
  required void onError(error),
}) {
  return RealtimeWebSocketClient.getInstance(this._core).watch(
    envId: this._core.config.envId,
    collectionName: this._coll,
    query: jsonEncode({'_id': this._id}),
    onChange: onChange,
    onError: onError,
  );
}