AmrJyniat
08/24/2022, 10:07 AMwhen (loginUiState) {
is LoginEmailUiState ->
LoginEmailPassContainer(loginUiState)
is ResetPasswordUiState ->
ResetPasswordContainer(loginUiState)
}
How I can achieve that?Oleksandr Balan
08/24/2022, 10:12 AMAnimatedContent
This is the way mandalorian
https://developer.android.com/jetpack/compose/animation#animatedcontent
You could start with default:
AnimatedContent(targetState = loginUiState) { state ->
when (state) {
is LoginEmailUiState ->
LoginEmailPassContainer(state)
is ResetPasswordUiState ->
ResetPasswordContainer(state)
}
}
And then tweak transitionSpec
as needed, see docs above ☝️Yashwant Gowla
08/24/2022, 10:13 AM