Hello folks! Is there a way to get the current progress of
Transition
on a more granular level rather than current/target state? I'm trying to use
Transition.playTimeNanos
and
Transition.totalDurationNanos
. But total duration is calculated only in seek mode, which as I assume is reserved for tooling.
cc @Doris Liu
Anton Shilov
10/19/2021, 2:33 PM
Copy code
val progress = derivedStateOf {
if (transition.totalDurationNanos != 0L)
// total duration is always 0 unles you're in a seek mode
transition.playTimeNanos / transition.totalDurationNanos
else 0L
}