range property
See ScaleLinear.range
.
When the range
is specified, the given two-element list is converted to
an interpolation function using piecewise
.
final color = ScaleDiverging(…)..range = ["red", "white", "blue"];
The above is equivalent to:
final color = ScaleSequential(interpolator: piecewise("red", "white", "blue"));
Implementation
@override
get range => [interpolator(0), interpolator(0.5), interpolator(1)];