watch method
Implementation
RealtimeListener watch({
void onChange(Snapshot snapshot)?,
void onError(error)?,
}) {
Map<String, String> orderBy = {};
this._fieldOrders!.forEach((order) {
orderBy[order.field] = order.direction;
});
return RealtimeWebSocketClient.getInstance(this._core).watch(
envId: this._core.config.envId,
collectionName: this._coll,
query: jsonEncode(this._fieldFilters),
limit: min(this._queryOptions!.limit ?? 0, 1000),
orderBy: orderBy,
onChange: onChange,
onError: onError,
);
}