PreferenceInputText
fun PreferenceScope.PreferenceInputText(value: MutableState<String>, validator: DialogInputValidator = rememberDialogInputValidator(), 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 = PreferenceInputTextDefaults.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 ->
PreferenceInputTextDefaults.dialog(dialogState, value.value, { value.value = it }, validator, title, icon)
})
A text preference item - this item provides a text input 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
Parameters
value
the MutableState of this item
validator
the DialogInputValidator of this item
fun PreferenceScope.PreferenceInputText(value: String, onValueChange: (value: String) -> Unit, validator: DialogInputValidator = rememberDialogInputValidator(), 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 = PreferenceInputTextDefaults.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 ->
PreferenceInputTextDefaults.dialog(dialogState, value, onValueChange, validator, title, icon)
})
A text preference item - this item provides a text input 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
Parameters
value
the value of this item
onValueChange
the value changed callback of this item
validator
the DialogInputValidator of this item