79586404

Date: 2025-04-22 12:03:34
Score: 0.5
Natty:
Report link

I would appreciate it if you could try this solution and let me know the outcome

@Preview
@Composable
fun test() {
    var map by remember { mutableStateOf(mapOf<String, Any>()) }
    var count by remember { mutableStateOf(0) }
    Column {
        Button(
            onClick = {
                count += 1
                map = map + ("key$count" to "value")
            }
        ) {
            Text(
                text = "Tap"
            )
        }
         testWidget1(map = map)
    }

}

@Composable
fun testWidget1(map: Map<String, Any>) {
    var testInt by remember { mutableStateOf(0) }
    LaunchedEffect(map) {
        testInt += 1
        request()
    }
    Text(
        text = "$testInt"
    )


}

fun request() {

}
Reasons:
  • Blacklisted phrase (1.5): would appreciate
  • Whitelisted phrase (-1): try this
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Sarita Nadar