Skip to content

Commit f3864c9

Browse files
committed
Clarify automatic caching applies to all selector functions
Updated section title and content to make clear that automatic caching with allowObservableChange applies to all watch functions with selector parameters (watchValue, watchStream, watchFuture, etc.), not just watchValue().
1 parent 406f563 commit f3864c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/documentation/watch_it/watching_multiple_values.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ class SettingsWidget extends WatchingWidget {
146146

147147
**Key benefit:** Rebuilds only when `s.darkMode` **value** changes, ignoring notifications about other property changes.
148148

149-
## Safety: Automatic Caching with allowObservableChange
149+
## Safety: Automatic Caching in Selector Functions
150150

151151
::: tip Safe to Use Operators in Selectors
152-
You can safely use `listen_it` operators like `combineLatest()` inside your `watchValue()` selector function. The default `allowObservableChange: false` ensures the operator chain is created once and cached.
152+
You can safely use `listen_it` operators like `combineLatest()` inside selector functions of `watchValue()`, `watchStream()`, `watchFuture()`, and other watch functions. The default `allowObservableChange: false` ensures the operator chain is created once and cached.
153153
:::
154154

155155
<<< @/../code_samples/lib/watch_it/multiple_values_inline_combine_safe.dart#safe_inline_combine

0 commit comments

Comments
 (0)