Created
May 27, 2020 11:18
-
-
Save ahmedrizwan/aa317d6a4725bc6f31f99787fb0de7c9 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
// Side drag | |
val sideMin = 90.dp | |
val sideMax = boxWidth - 30.dp | |
val (sideMinPx, sideMaxPx) = with(DensityAmbient.current) { | |
sideMin.toPx().value to sideMax.toPx().value | |
} | |
val sideFlingConfig = AnchorsFlingConfig(listOf(sideMinPx, sideMaxPx)) | |
val sidePosition = animatedFloat(sideMaxPx) | |
sidePosition.setBounds(sideMinPx, sideMaxPx) | |
val sideDrag = Drag( | |
position = sidePosition, | |
flingConfig = sideFlingConfig | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment