RadialColorGradient class

A radial gradient for color values.

Creates a circular gradient radiating from a center point.

Inheritance

Constructors

RadialColorGradient({required List<ColorStop> colors, TileMode tileMode = TileMode.clamp, AlignmentGeometry center = Alignment.center, AlignmentGeometry? focal, double radius = 0.5, double focalRadius = 0.0})
Creates a radial color gradient.
const

Properties

center AlignmentGeometry
The center point of the gradient.
final
colors List<ColorStop>
The color stops defining the gradient.
final
focal AlignmentGeometry?
The focal point of the gradient (for elliptical gradients).
final
focalRadius double
The focal radius for elliptical gradients.
final
hashCode int
The hash code for this object.
no setterinherited
radius double
The radius of the gradient (0.0 to 1.0).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tileMode TileMode
How the gradient tiles beyond its bounds.
final

Methods

changeColorAndPositionAt(int index, ColorDerivative color, double position) RadialColorGradient
Changes both the color and position at the specified index.
override
changeColorAt(int index, ColorDerivative color) RadialColorGradient
Changes the color at the specified index.
override
changePositionAt(int index, double position) RadialColorGradient
Changes the position of the color stop at the specified index.
override
copyWith({List<ColorStop>? colors, TileMode? tileMode, AlignmentGeometry? center, AlignmentGeometry? focal, double? radius, double? focalRadius}) RadialColorGradient
Creates a copy of this gradient with optional modifications.
override
insertColorAt(ColorDerivative color, Offset position, Size size, TextDirection textDirection) → ({RadialColorGradient 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() RadialGradient
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