amar_1995
02/25/2020, 8:20 AMContextAmbient.current
inside onImeActionPerformed
it throws Functions which invoke @Composable functions must be marked with the @Composable annotation
errorLeland Richardson [G]
02/25/2020, 8:29 AMcurrent
of an ambient can only be called in a composable function. You’re trying to do it in a lambda of a callback. Instead, call it in the composable and cache it in a variable, and then use the variable in the lambda.amar_1995
02/25/2020, 8:40 AMcustomTextFeild(
hint = HINT,
value = value.value,
onValueChange = { value.value = it },
modifier = LayoutFlexible(1f) + LayoutGravity.Center + LayoutPadding(
left = 8.dp,
right = 8.dp
),
onImeClickPerformed = {
context
onSearchClick(value.value)
}
)