Skip to content

Instantly share code, notes, and snippets.

@cp-radhika-s
Created April 26, 2022 11:39
Show Gist options
  • Save cp-radhika-s/cd2b55b382705fd006acfdb86d4b26d3 to your computer and use it in GitHub Desktop.
Save cp-radhika-s/cd2b55b382705fd006acfdb86d4b26d3 to your computer and use it in GitHub Desktop.
val keyboardController = LocalSoftwareKeyboardController.current
var text by remember {
mutableStateOf("")
}
TextField(
value = text,
onValueChange = { text = it },
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
keyboardActions = KeyboardActions(
onDone = { keyboardController?.hide() }),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment