Colton Idle
09/24/2020, 3:34 AMTextField(
value = textState.value,
onValueChange = { textState.value = it },
imeAction = ImeAction.Done,
onImeActionPerformed = { imeAction: ImeAction, softwareKeyboardController: SoftwareKeyboardController? ->
Toast.makeText(ContextAmbient.current, "asdf", Toast.LENGTH_SHORT).show()
}
)
SaurabhS
09/24/2020, 5:06 AMcurrent
property is a composable and has to be called inside a composable scope. onImeActionPerformed
is not a composable lambda. Instead, call val context = ContextAmbient.current
outside the lambda and use that.Colton Idle
09/25/2020, 2:08 AM