TimeIndicators.halfHours constructor
TimeIndicators.halfHours({
- Key? key,
- TimeBasedStyleProvider<
TimeIndicatorStyle> ? styleProvider, - Alignment alignment = Alignment.centerRight,
- int firstHalfHour = 1,
- int lastHalfHour = Duration.hoursPerDay * 2 - 1,
- bool alignFirstAndLastLabelsInside = false,
Implementation
factory TimeIndicators.halfHours({
Key? key,
TimeBasedStyleProvider<TimeIndicatorStyle>? styleProvider,
Alignment alignment = Alignment.centerRight,
int firstHalfHour = 1,
int lastHalfHour = Duration.hoursPerDay * 2 - 1,
bool alignFirstAndLastLabelsInside = false,
}) {
return TimeIndicators._build(
key: key,
styleProvider: styleProvider,
alignment: alignment,
firstIndex: firstHalfHour,
lastIndex: lastHalfHour,
alignFirstAndLastLabelsInside: alignFirstAndLastLabelsInside,
indexToTime: (it) => 30.minutes * it,
formatter: TimeIndicator.formatHourMinute,
);
}