Created
December 6, 2023 11:04
-
-
Save mohanmanu484/22adda76bdc579725681a2711636052c to your computer and use it in GitHub Desktop.
EmailField which uses rememberSaveable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalMaterial3Api::class) | |
@Composable | |
fun EmailField(name: String, modifier: Modifier = Modifier) { | |
var email: String by rememberSaveable { | |
mutableStateOf("") | |
} | |
TextField(value = email, modifier = modifier, onValueChange = { | |
email = it | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment