How to dispose LiveQuery (not liveQuery.client.unSubscribe)?

I want to dispose live query

So you normally want to do livequery but you want to dispose it whenever you want?

Yes, but I’ve found a solution
MessageUseCaseImpl(this.allRepositories, this.userRepositories, this.liveQuery):super(){
liveQuery.client.reconnect(userInitialized: true);
}

void unSubscribe(){
if (_messagesSubscription!=null) {
liveQuery.client.unSubscribe(_messagesSubscription!);
_messagesSubscription = null;
}
liveQuery.client.disconnect(userInitialized: true);
}