How to create timed Instagram story loading bar using Jetpack Compose animation?

I would like to create a composable component very similar to Instagram story loading bar with 10 seconds of duration.

enter image description here

I had an idea how to do it but I’m not how to executed. I was thinking about adding a static bar (grey color) using a BOX and then add another bar (white color) which animates from 0 to final of composable width in 10 seconds.

Do you have any idea how I can implement this component?

Source: Android Questions

LEAVE A COMMENT