set method

void set(
  1. T newStart,
  2. T newEnd, [
  3. T? newStep
])

Modifies the boundaries of this number line sequence.

Implementation

void set(T newStart, T newEnd, [T? newStep]) {
  start = newStart;
  end = newEnd;
  if (newStep != null) {
    if (newStep == 0){
      throw ArgumentError('Step cannot be zero.');
    }
    step = newStep;
  }
}