Skip to content

Instantly share code, notes, and snippets.

@lisonge
Created February 1, 2025 11:41
Show Gist options
  • Save lisonge/b966cbb10728e7cdc60cf3ad971b4b81 to your computer and use it in GitHub Desktop.
Save lisonge/b966cbb10728e7cdc60cf3ad971b4b81 to your computer and use it in GitHub Desktop.
@Composable
fun LazyItemScope.inOutAnimateItem(): Modifier {
return Modifier.animateItem(
fadeInSpec = spring(stiffness = Spring.StiffnessMediumLow),
placementSpec = spring(
stiffness = Spring.StiffnessMediumLow,
visibilityThreshold = IntOffset.VisibilityThreshold
),
fadeOutSpec = spring(stiffness = Spring.StiffnessMediumLow)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment