Zac Sweers
NOTHING_TO_INLINE
@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
A modern programming language that makes developers happier.