setMiddleIndex method
void
setMiddleIndex(
- int index
)
override
Implementation
@override
void setMiddleIndex(int index) {
super.setMiddleIndex(index);
DateTime time = currentTime.add(Duration(days: _currentLeftIndex));
if (isAtSameDay(minTime, time) && index == 0) {
var maxIndex = 60 - minTime!.minute - 1;
if (_currentRightIndex > maxIndex) {
_currentRightIndex = maxIndex;
}
} else if (isAtSameDay(maxTime, time) &&
_currentMiddleIndex == maxTime!.hour) {
var maxIndex = maxTime!.minute;
if (_currentRightIndex > maxIndex) {
_currentRightIndex = maxIndex;
}
}
}