Zac Sweers
02/05/2024, 2:50 AMNOTHING_TO_INLINE
on this, but since it has function parameters this seems like a reasonable candidate. I wanted to check here if this is expected before filing a bug
@Composable
inline fun <S> Transition<S>.animateColorList(
targetColorListByState: @Composable (state: S) -> ImmutableList<Color>,
label: String,
noinline transitionSpec:
@Composable
Transition.Segment<ImmutableList<Color>>.() -> FiniteAnimationSpec<Color> =
{
spring()
},
): State<ImmutableList<Color>> {
val colorSpace = targetColorListByState(currentState).first().colorSpace
val typeConverter = remember(colorSpace) { Color.VectorConverter(colorSpace) }
return animateValueList(
typeConverter = typeConverter,
targetValueListByState = targetColorListByState,
label = label,
transitionSpec = transitionSpec,
)
}
dmitriy.novozhilov
02/05/2024, 3:17 AMZac Sweers
02/19/2024, 9:46 PM