steppedStops property Null safety

List<double> steppedStops

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.


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