I am trying to do a show and hide password with a ...
# compose
g
I am trying to do a show and hide password with a trainingIcon on a OutlinedTextField, however clicking the icon cause the text field to be edited. Any recommendations.
Copy code
ui.TextFieldWithHint(
                            text = appModel.session.user.pass,
                            onDone = {
                                appModel.session.user.pass = it
                            },
                            hint = {
                                Text(stringResource(R.string.passworldHint))
                            },
                            trailingIcon = @Composable {
                                Surface(Modifier.clickable(onClick = {
                                    showPassword = !showPassword
                                })) {
                                    Icon(<http://Icons.Outlined.Info|Icons.Outlined.Info>)
                                }
                            },
                            keyboardType = KeyboardType.Password,
                            visualTransformation = if (showPassword) VisualTransformation.None 
                              else PasswordVisualTransformation()
                        )