@@ -4,10 +4,40 @@ import androidx.compose.animation.*
44import androidx.compose.animation.SharedTransitionScope.*
55import androidx.compose.animation.SharedTransitionScope.PlaceHolderSize.Companion.contentSize
66import androidx.compose.animation.SharedTransitionScope.ResizeMode.Companion.ScaleToBounds
7+ import androidx.compose.runtime.Composable
78import androidx.compose.ui.Alignment.Companion.Center
89import androidx.compose.ui.Modifier
910import androidx.compose.ui.layout.ContentScale
1011
12+ // ============================ //
13+ // ----- animateEnterExit ----- //
14+ // ============================ //
15+
16+ context(animatedVisibilityScope: AnimatedVisibilityScope )
17+ fun Modifier.animateEnterExit (
18+ enter : EnterTransition = fadeIn(),
19+ exit : ExitTransition = fadeOut(),
20+ label : String = "animateEnterExit",
21+ ): Modifier {
22+ with (animatedVisibilityScope) {
23+ return animateEnterExit(
24+ enter = enter,
25+ exit = exit,
26+ label = label,
27+ )
28+ }
29+ }
30+
31+ // ========================= //
32+ // ----- sharedElement ----- //
33+ // ========================= //
34+
35+ @Composable
36+ context(sharedTransitionScope: SharedTransitionScope )
37+ fun rememberSharedContentState (key : Any ): SharedContentState {
38+ return sharedTransitionScope.rememberSharedContentState(key)
39+ }
40+
1141// ========================= //
1242// ----- sharedElement ----- //
1343// ========================= //
0 commit comments