toGradientSpec method
The scale as ascending (values, colors) gradient arrays in value space.
Implementation
@override
GradientSpec toGradientSpec() {
assert(stops.length >= 2, 'A stops color scale needs at least 2 stops');
assert(_isAscending([for (final s in stops) s.value]));
return GradientSpec(
[for (final s in stops) s.value],
[for (final s in stops) s.color],
);
}