CamoTimePicker
A time field: the text-field frame showing value in the locale's short time (24 or 12 hours per
use24Hour, null following the device), opening a CamoTimeInput in a popup on wide windows and a bottom
sheet otherwise. Cancel/OK confirm by default (TimePickerTheme.confirmButton); OK is disabled outside
minTime…maxTime, a window that may run past midnight.
API
- Kotlin
- Dart
public fun CamoTimeField(
value: LocalTime?,
onValueChange: (LocalTime) -> Unit,
modifier: Modifier = Modifier,
label: String? = null,
placeholder: String? = null,
supportingText: String? = null,
error: String? = null,
minuteStep: Int = 1,
use24Hour: Boolean? = null,
minTime: LocalTime? = null,
maxTime: LocalTime? = null,
presentation: PickerPresentation = PickerPresentation.Auto,
enabled: Boolean = true,
onFocusChanged: ((Boolean) -> Unit)? = null,
)
| Name | Type | Default |
|---|---|---|
value | LocalTime? | |
onValueChange | (LocalTime) -> Unit | required |
modifier | Modifier | Modifier |
label | String? | null |
placeholder | String? | null |
supportingText | String? | null |
error | String? | null |
minuteStep | Int | 1 |
use24Hour | Boolean? | null |
minTime | LocalTime? | null |
maxTime | LocalTime? | null |
presentation | PickerPresentation | PickerPresentation.Auto |
enabled | Boolean | true |
onFocusChanged | ((Boolean) -> Unit)? | null |
Design notes
Why CamoTimePicker works this way, its states and its edge cases: contributor docs.