This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// invoking this in the viewmodel. | |
class MainViewModel @Inject constructor( | |
private val checkIfFirstLaunchTimeIsStored: CheckIfFirstLaunchTimeIsStored, | |
) : ViewModel() { | |
fun checkTheFirstLaunchTime(activity: Activity) { | |
viewModelScope.launch { | |
checkIfFirstLaunchTimeIsStored(activity) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val animatable = remember { | |
Animatable(0.5f) | |
} | |
LaunchedEffect(key1 = true) { | |
animatable.animateTo(1f, tween(350, easing = FastOutSlowInEasing)) | |
// you can tweak out and customize these animations. | |
} | |
// add this animatable to your card's modifier graphics layer. | |
BookItem(modifier = cardMod.graphicsLayer { | |
this.scaleX = animatable.value |