track<R> method
R
track<R>(
- R fn()
Executes the given function fn within this effect's tracking context.
This registers any signals read during fn as dependencies of this effect.
Implementation
R track<R>(R Function() fn) {
if (_isDisposed) return fn();
_runCleanups();
pushConsumer(this);
try {
clearDependencies();
return fn();
} finally {
popConsumer();
}
}