This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns a [State] holding a local animation time in milliseconds. | |
* The value always starts at `0L` and stops updating when | |
* the call leaves the composition. | |
*/ | |
@Composable | |
fun animationTimeMillis(): State<Long> { | |
val millisState = state { 0L } | |
val lifecycleOwner = LifecycleOwnerAmbient.current | |
launchInComposition { |