var showPassword by remember { mutableStateOf(false) }
OutlinedTextField(value = text,
modifier = inputModifier,
textStyle = inputTextStyle,
onValueChange = {
onValueChange(it)
},
visualTransformation = if (showPassword) {
VisualTransformation.None
} else {
PasswordVisualTransformation()
}, trailingIcon = {
if (showPassword) {
IconButton(onClick = { showPassword = false }) {
VectorIcon(imageVector = Icons.Filled.Visibility)
}
} else {
IconButton(onClick = { showPassword = true }) {
VectorIcon(imageVector = Icons.Filled.VisibilityOff)
}
}
}
)
0 Comments