hourLabelFormatter property

String Function(int hour)? hourLabelFormatter
getter/setter pair

Formats the integer hour shown in the left-hand hour column. Receives the hour-of-day (minHour..maxHour) and returns the label text. When null the hour is rendered as the bare integer (e.g. 9, 17).

Use it for zero-padding, AM/PM, or intl formatting, e.g. hourLabelFormatter: (h) => h.toString().padLeft(2, '0') → 09, 17.

Implementation

String Function(int hour)? hourLabelFormatter;