-
-
Save Ahmed-Sellami/fb8e98a1d3f995787cc3fdb7d9bec11e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExperimentalAnimationApi | |
@Composable | |
fun ShoesCard(shoesArticle: ShoesArticle, onDeleted: () -> Unit) { | |
/* ... */ | |
val funnelWidth = radius * 3 | |
val sideShapeWidth = funnelWidth + particleRadius * 2 | |
val offsetX = remember { Animatable(0f) } | |
Box { | |
Canvas(/* ... */) { /* ... */ } | |
Canvas(/* ... */) { /* ... */ } | |
Box(Modifier | |
.padding(horizontal = 16.dp) | |
.swipeToDelete(offsetX, maximumWidth = sideShapeWidth) { | |
onDeleted() | |
} | |
) { /* ... */ } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment