TimeIndicators.hours constructor

TimeIndicators.hours({
  1. Key? key,
  2. TimeBasedStyleProvider<TimeIndicatorStyle>? styleProvider,
  3. Alignment alignment = Alignment.centerRight,
  4. int firstHour = 1,
  5. int lastHour = Duration.hoursPerDay - 1,
  6. bool alignFirstAndLastLabelsInside = false,
})

Implementation

factory TimeIndicators.hours({
  Key? key,
  TimeBasedStyleProvider<TimeIndicatorStyle>? styleProvider,
  Alignment alignment = Alignment.centerRight,
  int firstHour = 1,
  int lastHour = Duration.hoursPerDay - 1,
  bool alignFirstAndLastLabelsInside = false,
}) {
  return TimeIndicators._build(
    key: key,
    styleProvider: styleProvider,
    alignment: alignment,
    firstIndex: firstHour,
    lastIndex: lastHour,
    alignFirstAndLastLabelsInside: alignFirstAndLastLabelsInside,
    indexToTime: (it) => it.hours,
    formatter: TimeIndicator.formatHour,
  );
}