transform property

TransformGradient? transform
final

Register a callback that accepts the x and y that are provided
from Roll.rollListenable * Crinkle.scalar, where that
animation value ranges from min to max over period.

If no transform is provided, default will be a TranslateGradient.

GradientTransform, which this function is expected to return,
is an abstract class with a single method that transforms the
gradient based on bounds and text direction.

Extend that class and override transform(), returning some Matrix4.

@override
Matrix4? transform(Rect bounds, {TextDirection? textDirection});

When a Gradient creates its Shader, it will call this method to
determine what transform to apply to the shader for the given Rect and
TextDirection.
Implementers may return null from this method, which achieves the same
final effect as returning Matrix4.identity.

Implementation

final TransformGradient? transform;