dispose method

void dispose()

Cancels the query's invalidation stream subscription and prevents future state updates.

Call when the enclosing controller or component unmounts.

userQuery.dispose();

Implementation

void dispose() {
  _isDisposed = true;
  _invalidationSub?.cancel();
}