Functions which invoke @Composable functions must be marked with the @Composable annotation
Leland Richardson [G]
2 years ago
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.