compose 旋转动画

    val rotationValue by animateFloatAsState(targetValue = if (chatViewModel.showWaitList.value) -180f else 0f)
        Image(painter = painterResource(id = triangleImage),
                        contentDescription = null,
                        modifier = Modifier
                            .width(7.dp)
                            .graphicsLayer {
                                rotationX =rotationValue
                            })

chatViewModel.showWaitList.value可以理解为一个val data= remember{ mustatus(true)}的值

猜你喜欢

转载自blog.csdn.net/mp624183768/article/details/127110100