generateMinutesOrSeconds function
List<int?>
generateMinutesOrSeconds(
- int divisions,
- TimePickerInterval? interval,
- dynamic min,
- dynamic max,
Generate a List of minutes
Implementation
List<int?> generateMinutesOrSeconds(
int divisions,
TimePickerInterval? interval,
min,
max,
) {
final minutes = List<int?>.generate(divisions + 1, (index) {
final val =
min.round() + (getIntFromTimePickerIntervalEnum(interval) * index);
if (val >= max) {
return max.round();
}
return val;
});
return minutes;
}