KotlinLeaner
03/09/2023, 8:50 PMcustom PaddingValues object that returns the animated values
? i didn't get it. Is there any example for this? I tried some piece of code to split into function
@Composable
private fun PaddingViewAnimation() {
var visible by remember { mutableStateOf(true) }
val iconOffsetAnimation: Dp by animateDpAsState(
if (visible) 13.dp else 0.dp, tween(1000)
)
PaddingViewAnimationStateLess(
{ iconOffsetAnimation },
visible,
onVisibleChange = {
visible = it
}
)
}