Skip to content

Commit

Permalink
#25 feat: 미사용 import 제거 및 navcontroller 메서드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungWoo-Ahn committed Apr 18, 2024
1 parent 459d09b commit 8dd4a06
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package io.tuttut.presentation.navigation

import androidx.compose.animation.AnimatedContentTransitionScope
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.spring
import androidx.navigation.NavBackStackEntry

fun enterAnimation(): (AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition)
= {
slideIntoContainer(
towards = AnimatedContentTransitionScope.SlideDirection.Left,
animationSpec = spring(
dampingRatio = 0.9F,
stiffness = Spring.StiffnessLow
)
)
}

fun popEnterAnimation(): (AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition)
= {
slideIntoContainer(
towards = AnimatedContentTransitionScope.SlideDirection.Right,
animationSpec = spring(
dampingRatio = 0.9F,
stiffness = Spring.StiffnessLow
)
)
}

0 comments on commit 8dd4a06

Please sign in to comment.