getMin function

double getMin(
  1. double? minMinute,
  2. TimePickerInterval? interval
)

Get the minimum minute from interval

Implementation

double getMin(double? minMinute, TimePickerInterval? interval) {
  if (minMinute == 0) {
    return 0;
  }
  int step = getIntFromTimePickerIntervalEnum(interval);

  double min = -1;
  double i = 1;
  while (min < 0) {
    double val = i * step;
    if (val >= minMinute!) {
      min = val;
    }
    i++;
  }
  return min;
}