TweenVisitor<T extends Object> typedef

TweenVisitor<T extends Object> = Tween<T>? Function(Tween<T>? tween, T targetValue, TweenConstructor<T> constructor)

Signature for callbacks passed to ImplicitlyAnimatedWidgetState.forEachTween.

The tween argument should contain the current tween value. This will initially be null when the state is first initialized.

The targetValue argument should contain the value toward which the state is animating. For instance, if the state is animating its widget's opacity value, then this argument should contain the widget's current opacity value.

The constructor argument should contain a function that takes a value (the widget's value being animated) and returns a tween beginning at that value.

forEachTween() is expected to update its tween value to the return value of this visitor.

The <T> parameter specifies the type of value that's being animated.

Implementation

typedef TweenVisitor<T extends Object> = Tween<T>? Function(Tween<T>? tween, T targetValue, TweenConstructor<T> constructor);