notifyEffect method
Handles effect notifications by processing the specified effect
.
When an effect
first receives any of the following flags:
dirty
pendingComputed
pendingEffect
this method will process them and returntrue
if the flags are successfully handled. If not fully handled, future changes to these flags will trigger additional calls until the method eventually returnstrue
.
Implementation
@override
bool notifyEffect(Subscriber effect) {
if (effect is EffectScope) {
return notifyEffectScope(effect);
}
final flags = effect.flags;
if ((flags & SubscriberFlags.dirty) != 0 ||
((flags & SubscriberFlags.pendingComputed) != 0 &&
updateDirtyFlag(effect, flags))) {
runEffect(effect as Effect);
} else {
processPendingInnerEffects(effect, effect.flags);
}
return true;
}