Zoltan Demant
04/10/2024, 7:03 AMSeekableTransitionState
with just the current value specified: val seekingState = remember { SeekableTransitionState(BoxSize.Small) }
However, when I try to use it... it requires both initialState
and targetState
. Why is that? Imports are correct, I am using CMP 1.6.1 though (documentation states that it was added in 1.6.0). If its a version thing, can I pass in the same value as the first initial and targetState?Stylianos Gakis
04/10/2024, 7:11 AMZoltan Demant
04/10/2024, 7:12 AMStylianos Gakis
04/10/2024, 7:13 AMStylianos Gakis
04/10/2024, 7:15 AMoverride var targetState: S by mutableStateOf(initialState)
internal set
override var currentState: S by mutableStateOf(initialState)
internal set
initially there in the google sources. You should be able to do the same. Or even provide a new function which does not take target state but defaults it to the initial state so that you don’t have to think about it each timeZoltan Demant
04/10/2024, 7:16 AMZoltan Demant
04/10/2024, 7:57 AMStylianos Gakis
04/10/2024, 7:57 AMZoltan Demant
04/10/2024, 7:59 AMStylianos Gakis
04/10/2024, 8:02 AMZoltan Demant
04/10/2024, 9:16 AMZoltan Demant
04/10/2024, 10:54 AMStylianos Gakis
04/10/2024, 11:00 AMZoltan Demant
04/10/2024, 11:45 AMStylianos Gakis
04/10/2024, 11:47 AMconst val DurationMedium1 = 250.0
val EasingStandardCubicBezier = CubicBezierEasing(0.2f, 0.0f, 0.0f, 1.0f)
val EasingStandardAccelerateCubicBezier = CubicBezierEasing(0.3f, 0.0f, 1.0f, 1.0f)
Which are here https://github.com/HedvigInsurance/android/blob/7e85f0db5781027e32700587c32c517454[…]dvig/android/core/designsystem/material3/motion/MotionTokens.ktStylianos Gakis
04/10/2024, 11:48 AMZoltan Demant
04/10/2024, 11:49 AMZoltan Demant
04/10/2024, 11:50 AMStylianos Gakis
04/10/2024, 11:52 AMZoltan Demant
04/10/2024, 11:57 AMZoltan Demant
04/10/2024, 12:00 PMStylianos Gakis
04/10/2024, 12:09 PMZoltan Demant
04/10/2024, 12:32 PMStylianos Gakis
04/10/2024, 12:55 PMZoltan Demant
04/10/2024, 2:36 PMStylianos Gakis
04/10/2024, 2:41 PMZoltan Demant
04/11/2024, 7:12 AM