snippets icon indicating copy to clipboard operation
snippets copied to clipboard

Add an example of seeking between shared element states manually using SeekableTransitionState

Open riggaroo opened this issue 1 year ago • 1 comments
trafficstars

Using SeekableTransitionState and rememberUpdatedTransition() with Transition#AnimatedContent, we can control the shared element seeking state,

In this example, a Slider is added to allow for seeking between Home and Details state. The slider also shows progress as the animation happens - so when you click on an item, the progress bar will animate from 0 to 1 - and then back to 0 as it completes the transition.

SeekableTransitionState can be used to build up your own navigation library, or between different states within one Screen of your UI, if you need the ability to seek between states.

riggaroo avatar May 20 '24 17:05 riggaroo