SharedTransitionScope
Composable Function
Common
@ExperimentalSharedTransitionApi
@Composable
public fun SharedTransitionScope(content: @Composable SharedTransitionScope.(Modifier) -> Unit)
SharedTransitionScope
creates a SharedTransitionScope
for the child layouts in content
. Any
child (direct or indirect) of the SharedTransitionLayout
can use the receiver scope
SharedTransitionScope
to create shared element or shared bounds transitions.
SharedTransitionScope
will not creates a new Layout.
IMPORTANT: It is important to set the Modifier
provided to the content
on the first and
top-most child, as the Modifier
both obtains the root coordinates and creates an overlay. If
the first child layout in content
isn't the child with the highest zIndex, consider using
SharedTransitionLayout
instead.
Parameters
content | The children composable to be laid out. |