updateComputed<T> function
Update the computed value and return true if changed
Implementation
@pragma('vm:prefer-inline')
@pragma('wasm:prefer-inline')
@pragma('dart2js:prefer-inline')
bool updateComputed<T>(Computed<T> computed) {
++cycle;
computed.depsTail = null;
computed.flags = (ReactiveFlags.mutable | ReactiveFlags.recursedCheck);
final prevSub = setActiveSub(computed);
try {
final oldValue = computed.pendingValue;
return (oldValue != (computed.pendingValue = computed.getter()));
} finally {
activeSub = prevSub;
computed.flags &= ~(ReactiveFlags.recursedCheck);
purgeDeps(computed);
}
}