notifyAll<T> function
T
notifyAll<T>(
- T fn()
Executes a function and notifies all dependencies of changes.
This function creates a temporary reactive context, executes the function, and then notifies all dependencies that were accessed during execution. This is useful for triggering updates without actually changing values.
Parameters:
fn: Function to execute
Returns: The result of the function execution
Example:
notifyAll(() {
// Access signals to trigger their subscribers
final value = signal.value;
});
Implementation
@pragma("vm:prefer-inline")
@pragma("wasm:prefer-inline")
@pragma("dart2js:prefer-inline")
T notifyAll<T>(T Function() fn) => trigger(fn);