setLeftIndex method

void setLeftIndex(
  1. int index
)

Implementation

void setLeftIndex(int index) {
  DateTime time = currentTime.add(Duration(days: index));
  if (isAtSameDay(minTime, time)) {
    var index = min(24 - minTime!.hour - 1, _currentIndex[1]!);
    this.setMiddleIndex(index);
  } else if (isAtSameDay(maxTime, time)) {
    var index = min(maxTime!.hour, _currentIndex[1]!);
    this.setMiddleIndex(index);
  }
}