num TransitionFunction(num ratio)

The TransitionFunction is the function signature for transitions used in the Tween and Translation classes. The function takes the ratio between 0.0 and 1.0 and returns the actual progress of the transition.

See also: Transition, Tween, Translation

Examples:

// a linear transition
TransitionFunction transition = (ratio) => ratio;

// a quadratic transition
TransitionFunction transition = (ratio) => ratio * ratio;

Source

typedef num TransitionFunction(num ratio);