dispose method

void dispose()

Implementation

void dispose() {
  Subscription<T>? liveQuerySubscription = _liveQuerySubscription;
  if (liveQuerySubscription != null) {
    LiveQuery().client.unSubscribe(liveQuerySubscription);
    _liveQuerySubscription = null;
  }
  StreamSubscription<LiveQueryClientEvent>? liveQueryClientEventSubscription =
      _liveQueryClientEventSubscription;
  if (liveQueryClientEventSubscription != null) {
    liveQueryClientEventSubscription.cancel();
    _liveQueryClientEventSubscription = null;
  }
  while (_list.isNotEmpty) {
    _list.removeLast().dispose();
  }
}