generateMidValues static method

List<int> generateMidValues({
  1. required int scaleMinValue,
  2. required int scaleMaxValue,
  3. int numValuesGenerated = 10,
})

Implementation

static List<int> generateMidValues({
  required int scaleMinValue,
  required int scaleMaxValue,
  int numValuesGenerated = 10,
}) {
  final int midValueStepSize = getAutostepSize(
    scaleMaxValue: scaleMinValue,
    numValuesGenerated: numValuesGenerated,
  );
  final List<int> midValues = [];

  for (int midValue = scaleMinValue + midValueStepSize;
      midValue < scaleMaxValue;
      midValue += midValueStepSize) {
    midValues.add(midValue);
    if (midValues.length >= numValuesGenerated) {
      break;
    }
  }
  return midValues;
}