ColorSequence class

A sequence of colors representing a gradient or a color transition over time. The sequence is represented by a list of colors and a list of colorStops, the stops are normalized values (0.0 to 1.0) and ordered in the list. Both lists have the same number of elements.

Constructors

ColorSequence(List<Color> colors, List<double> colorStops)
Creates a new color sequence from a list of colors and a list of colorStops.
ColorSequence.copy(ColorSequence sequence)
Creates a new color sequence by copying an existing sequence.
ColorSequence.fromStartAndEndColor(Color start, Color end)
Creates a new color sequence from a start and an end color.

Properties

colors List<Color>
List of colors.
read / write
colorStops List<double>
List of color stops, normalized values (0.0 to 1.0) and ordered.
read / write
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

colorAtPosition(double pos) Color
Returns the color at a normalized (0.0 to 1.0) position in the color sequence. If a color stop isn't hit, the returned color will be an interpolation of a color between two color stops.
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