Steps class Null safety

These Steps work a little bit differently than standard Gradients.

The Gradient.colors & Gradient.stops properties are duplicated to create hard-edge transitions instead of smooth ones.

Inheritance
Implementers
Available Extensions

Constructors

Steps({double softness = 0.0, required List<Color> colors, List<double>? stops, TileMode tileMode = TileMode.clamp, GradientTransform? transform})
These Steps work a little bit differently than standard Gradients. [...]
const

Properties

asGradient Gradient
Resolve these Steps to its smooth Gradient counterpart by colors and stops duplication, considering softness.
read-only
colors List<Color>
The colors the gradient should obtain at each of the stops. [...]
final, inherited
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
softness double
An incredibly small double to provide as an additive for each second entry when duplicating stops for this Steps. [...]
final
steppedColors List<Color>
A duplicated list of colors by CopyColors.
read-only
steppedStops List<double>
A duplicated list of stops by CopyStops (which may be null, in which case stopsOrImplied is employed). [...]
read-only
stops List<double>?
A list of values from 0.0 to 1.0 that denote fractions along the gradient. [...]
final, inherited
tileMode TileMode
How these Steps should tile the plane beyond the region before its starting stop and after its ending stop. [...]
final
transform GradientTransform?
The transform, if any, to apply to the gradient. [...]
final, inherited

Methods

createShader(Rect rect, {TextDirection? textDirection}) Shader
Resolve these Steps to its smooth Gradient counterpart, then use that gradient's createShader() method. [...]
override
lerpFrom(Gradient? a, double t) Gradient?
Linearly interpolates from another Gradient to this. [...]
@protected, inherited
lerpTo(Gradient? b, double t) Gradient?
Linearly interpolates from this to another Gradient. [...]
@protected, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
scale(double factor) Gradient
Returns a new gradient with its properties scaled by the given factor. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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