Gradient class

A shader (as used by Paint.shader) that renders a color gradient.

There are several types of gradients, represented by the various constructors on this class.

See also:

  • Gradient, the class in the painting library.
Inheritance

Constructors

Gradient.linear(Offset from, Offset to, List<Color> colors, [ List<double> colorStops, TileMode tileMode = TileMode.clamp, Float64List matrix4 ])
Creates a linear gradient from from to to. [...]
Gradient.radial(Offset center, double radius, List<Color> colors, [ List<double> colorStops, TileMode tileMode = TileMode.clamp, Float64List matrix4, Offset focal, double focalRadius = 0.0 ])
Creates a radial gradient centered at center that ends at radius distance from the center. [...]
Gradient.sweep(Offset center, List<Color> colors, [ List<double> colorStops, TileMode tileMode = TileMode.clamp, double startAngle = 0.0, double endAngle = math.pi * 2, Float64List matrix4 ])
Creates a sweep gradient centered at center that starts at startAngle and ends at endAngle. [...]

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited