Zoltan Demant
06/10/2025, 4:38 AMexpandVertically(
animationSpec = ..,
expandFrom = ..,
clip = true,
)
Is there any way I can change that externally in compose, say when Im using AnimatedContent?Jonathan
06/10/2025, 1:11 PMZoltan Demant
06/10/2025, 2:22 PMZoltan Demant
06/10/2025, 2:24 PMJonathan
06/10/2025, 2:46 PMyup, that would work, but i never reference this from my code.I don’t fully understand what you mean. If this is your code why cannot you pass in the values you want? Couldn’t you use a default value for the existing code and override the default for the situation where you don’t want clipping?
Zoltan Demant
06/10/2025, 3:13 PMinternal val ExpandVertically =
expandVertically(
animationSpec = SizeAnimator,
expandFrom = CenterVertically,
clip = true,
)
in my design system; which premade animations make use of internally.Zoltan Demant
06/10/2025, 3:14 PMZoltan Demant
06/10/2025, 3:14 PMdata object Fade : Effect {
override fun invoke() = FadeIn togetherWith FadeOut
}
this is what the premade animation looks like, one of many.Jonathan
06/10/2025, 3:16 PM@Composable
lambda that returns the appropriate animation? You could still assign the existing animation to a variable and new usages that need dynamic clipping would call the lambda?Zoltan Demant
06/10/2025, 3:21 PM