SweepColorGradient class
A sweep (angular/conical) gradient for color values.
Creates a gradient that sweeps around a center point.
- Inheritance
-
- Object
- ColorGradient
- SweepColorGradient
Constructors
-
SweepColorGradient({required List<
ColorStop> colors, TileMode tileMode = TileMode.clamp, AlignmentGeometry center = Alignment.center, double startAngle = 0.0, double endAngle = pi * 2}) -
Creates a sweep color gradient.
const
Properties
- center → AlignmentGeometry
-
The center point of the gradient.
final
-
colors
→ List<
ColorStop> -
The color stops defining the gradient.
final
- endAngle → double
-
The ending angle in radians.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startAngle → double
-
The starting angle in radians.
final
- tileMode → TileMode
-
How the gradient tiles beyond its bounds.
final
Methods
-
changeColorAndPositionAt(
int index, ColorDerivative color, double position) → SweepColorGradient -
Changes both the color and position at the specified
index.override -
changeColorAt(
int index, ColorDerivative color) → SweepColorGradient -
Changes the color at the specified
index.override -
changePositionAt(
int index, double position) → SweepColorGradient -
Changes the position of the color stop at the specified
index.override -
copyWith(
{List< ColorStop> ? colors, TileMode? tileMode, AlignmentGeometry? center, double? startAngle, double? endAngle}) → SweepColorGradient -
Creates a copy of this gradient with optional modifications.
override
-
insertColorAt(
ColorDerivative color, Offset position, Size size, TextDirection textDirection) → ({SweepColorGradient gradient, int index}) -
Inserts a new color stop at a specific position in the gradient.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toGradient(
) → SweepGradient -
Converts this color gradient to a Flutter Gradient.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited