ShapeGradient class

Serializable-style gradient config used by shape components.

Constructors

ShapeGradient.linear({required List<Color> colors, List<double>? stops, AlignmentGeometry begin = Alignment.centerLeft, AlignmentGeometry end = Alignment.centerRight, TileMode tileMode = TileMode.clamp})
const
ShapeGradient.radial({required List<Color> colors, List<double>? stops, AlignmentGeometry center = Alignment.center, double radius = 0.5, TileMode tileMode = TileMode.clamp})
const
ShapeGradient.sweep({required List<Color> colors, List<double>? stops, AlignmentGeometry center = Alignment.center, double startAngle = 0.0, double endAngle = 6.283185307179586, TileMode tileMode = TileMode.clamp})
const

Properties

begin AlignmentGeometry
Linear gradient begin alignment.
final
center AlignmentGeometry
Radial/sweep center alignment.
final
colors List<Color>
Gradient colors.
final
end AlignmentGeometry
Linear gradient end alignment.
final
endAngle double
Sweep gradient end angle in radians.
final
hashCode int
The hash code for this object.
no setterinherited
kind ShapeGradientKind
Gradient type.
final
radius double
Radial gradient radius in unit space.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startAngle double
Sweep gradient start angle in radians.
final
stops List<double>?
Optional stop values, same semantics as Flutter gradients.
final
tileMode TileMode
Tile mode for all gradient kinds.
final

Methods

createShader(Rect rect) Shader
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited