setData method

void setData(
  1. T newData
)

Overrides data directly in memory cache and notifies all active observers.

Example:

userQuery.setData(updatedUser);

Implementation

void setData(T newData) {
  BloomData.setQueryData<T>(key, (_) => newData);
  _data.value = newData;
  _status.value = QueryStatus.success;
  _error.value = null;
  _isStale.value = false;
}