removeTweens method Null safety

void removeTweens(
  1. TweenObject tweenObject
)

Removes all tweens from the specified tweenObject.

Implementation

void removeTweens(TweenObject tweenObject) {
  _AnimatableLink? link = _firstAnimatableLink;
  while (identical(link, _lastAnimatableLink) == false) {
    final animatable = link?.animatable;
    if (animatable is Tween &&
        identical(animatable.tweenObject, tweenObject)) {
      link?.animatable = null;
    }
    link = link?.nextAnimatableLink;
  }
}