-
-
Save skydoves/fc97b7b66bcadb241eb0c4a31bdc683a to your computer and use it in GitHub Desktop.
defer_example
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
@Composable | |
fun SlidingComposable(scrollPosition: Int) { | |
val scrollPositionInDp = with(LocalDensity.current) { scrollPosition.toDp() } | |
Card( | |
modifier = Modifier.offset(scrollPositionInDp), | |
backgroundColor = Color.Cyan | |
) { | |
Text( | |
text = "Hello I slide out" | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment