steppedStops property
A duplicated list of stops by CopyStops
(which may be null
, in
which case stopsOrImplied
is employed).
An optional softness is used during the list entry duplication process to make every duplicate just slightly larger than the original entry.
Implementation
List<double> get steppedStops {
final _stops =
(List<double>.from(stopsOrImplied(stops, colors.length + 1)));
// If local `stops` is not `null`, above [stopsOrImplied] will return
// that exact value. In that case, we do not want to build a stop list
// with an extra value and cut it off... just use the provided `stops`.
if (stops == null) _stops.removeLast();
return _stops ^ softness
..removeAt(0)
..add(1.0);
}