GradientRotation class
A GradientTransform that rotates the gradient around the center-point of its bounding box.
This sample would rotate a sweep gradient by a quarter turn clockwise:
link
const SweepGradient gradient = SweepGradient(
colors: <Color>[Color(0xFFFFFFFF), Color(0xFF009900)],
transform: GradientRotation(math.pi/4),
);
- Inheritance
-
- Object
- GradientTransform
- GradientRotation
- Annotations
Constructors
- GradientRotation(double radians)
-
Constructs a GradientRotation for the specified angle.
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
transform(
Rect bounds, {TextDirection? textDirection}) → Matrix4 -
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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override