range property

  1. @override
List<Y> get range
inherited

See ScaleLinear.range.

When the range is specified, the given two-element list is converted to an interpolation function using interpolate.

final color = ScaleSequential(…)..range = ["red", "blue"];

The above is equivalent to:

final color = ScaleSequential(interpolator: interpolate("red", "blue"));

Implementation

@override
get range => [interpolator(0), interpolator(1)];
  1. @override
set range (List<Y> range)
inherited

Implementation

@override
set range(range) {
  final r0 = range[0], r1 = range[1];
  interpolator = interpolate(r0, r1) as Y Function(num);
}