setEffectiveWeight method
Sets the weight and stops any scheduled fading. This method
can be chained.
If enabled is true, the effective weight (an internal
property) will also be set to this value; otherwise the effective weight
(directly affecting the animation at this moment) will be set to 0.
Note: .enabled will not be switched to false automatically, if
.weight is set to 0 by this method.
Implementation
AnimationAction setEffectiveWeight(double weight) {
this.weight = weight;
// note: same logic as when updated at runtime
_effectiveWeight = enabled ? weight : 0;
return stopFading();
}