GradientRotation class Null safety

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:
const SweepGradient gradient = SweepGradient(
  colors: <Color>[Color(0xFFFFFFFF), Color(0xFF009900)],
  transform: GradientRotation(math.pi/4),
);

Inheritance
Annotations

Constructors

GradientRotation(double radians)
Constructs a GradientRotation for the specified angle.
const

Properties

hashCode int
The hash code for this object.
read-onlyoverride
radians double
The angle of rotation in radians in the clockwise direction.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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