fun PreferenceScope.PreferenceTime(value: MutableState<LocalTime>, is24Hours: Boolean = is24HourFormat(), formatter: (time: LocalTime) -> String = getDefaultTimeFormatter(is24Hours), title: String, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, subtitle: String? = null, icon: @Composable () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceTimeDefaults.itemSetup(), titleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, subtitleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, filterTags: List<String> = emptyList(), dialog: @Composable (state: DialogState) -> Unit = { dialogState ->
PreferenceTimeDefaults.dialog(dialogState, value.value, { value.value = it }, is24Hours, title, icon)
}) A color preference item - this item provides a time picker dialog to change this preference
Basic Parameters: all params not described here are derived from com.michaelflisar.composepreferences.core.composables.BasePreference, check it out for more details
if true, the time picker shows a picker in 24h mode, otherwise it will use the 12h mode
the formatter to format the time
fun PreferenceScope.PreferenceTime(value: LocalTime, onValueChange: (value: LocalTime) -> Unit, is24Hours: Boolean = is24HourFormat(), formatter: (time: LocalTime) -> String = getDefaultTimeFormatter(is24Hours), title: String, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, subtitle: String? = null, icon: @Composable () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceTimeDefaults.itemSetup(), titleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, subtitleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, filterTags: List<String> = emptyList(), dialog: @Composable (state: DialogState) -> Unit = { dialogState ->
PreferenceTimeDefaults.dialog(dialogState, value, onValueChange, is24Hours, title, icon)
}) A color preference item - this item provides a time picker dialog to change this preference
Basic Parameters: all params not described here are derived from com.michaelflisar.composepreferences.core.composables.BasePreference, check it out for more details
the value changed callback of this item
if true, the time picker shows a picker in 24h mode, otherwise it will use the 12h mode
the formatter to format the time