Gradient class base

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:

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

debugDisposed bool
Whether dispose has been called.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Release the resources used by this object. The object is no longer usable after this method is called.
inherited
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