generateHours function
Generate a List of hours
Implementation
List<int?> generateHours(int divisions, min, max) {
final hours = List<int?>.generate(divisions, (index) {
final val = min.round() + index;
if (val >= max) {
return max.round();
}
return val;
});
return hours;
}