我写了一个 outlineTextField 并且 onValueChange 中的“它”在标签文本中不起作用
它不读取并且 Text 也显示错误。
val usernameState = rememberSaveable{ mutableStateOf(TextFieldValue) }
OutlinedTextField(
value = usernameState.value,
onValueChange = { usernameState.value = it },
label = { Text(text = "username")}
)
这是调用概述文本字段并进行设置的错误:
Modifier = ...,启用:Boolean = ...,只读:Boolean = ...,textStyle:TextStyle = ...,标签:(()-> Unit)?= ...,占位符:(()->单位)?= ...,leadingIcon:(()->单位)?= ..., trailingIcon: (() -> Unit)? = ..., isError: Boolean = ..., visualTransformation: VisualTransformation = ..., keyboardOptions: KeyboardOptions = ..., keyboardActions: KeyboardActions = ..., singleLine: Boolean = ..., maxLines: Int = . ..,interactionSource:MutableInteractionSource = ...,形状:Shape = ...,颜色:TextFieldColors = ...):在androidx.compose.material中定义的单位