setMiddleIndex method
void
setMiddleIndex(
- int index
)
Implementation
void setMiddleIndex(int index) {
DateTime time = currentTime.add(Duration(days: _currentIndex[0]!));
if (isAtSameDay(minTime, time) && index == 0) {
var maxIndex = 60 - minTime!.minute - 1;
if (_currentIndex[2]! > maxIndex) {
_currentIndex[2] = maxIndex;
}
} else if (isAtSameDay(maxTime, time) &&
_currentIndex[1] == maxTime!.hour) {
var maxIndex = maxTime!.minute;
if (_currentIndex[2]! > maxIndex) {
_currentIndex[2] = maxIndex;
}
}
}