discontinuedPackage vector_graphics_compiler_plus has been discontinued and replaced by vector_graphics_compiler.

Gradient class abstract

A shading program to apply to a Paint. Implemented in LinearGradient and RadialGradient.

Implementers
Annotations
  • @immutable

Properties

colors → List<Color>?
The colors to blend from the start to end points.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
The reference identifier for this gradient.
final
offsets → List<double>?
The positions to apply colors to. Must be the same length as colors.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tileMode → TileMode?
Specifies the meaning of from and to.
final
transform → AffineMatrix?
The transform, if any, to apply to the gradient.
final
unitMode → GradientUnitMode?
Whether the coordinates in this gradient should be transformed by the space this object occupies or by the root bounds.
final

Methods

applyBounds(Rect bounds, AffineMatrix transform) → Gradient
Apply the bounds and transform the shader.
applyProperties(Gradient ref) → Gradient
Creates a new gradient
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