It’s more related to delaying the state of the loading. Basically it wait X before showing and if it show, show for minimum X time. My problem is a bit related to delaying the state change. I’m trying to do with
produceState
not sure if this can work
Tgo1014
11/24/2021, 4:36 PM
Apparently this solve my problem, so I’m posting here for people in the future:
Copy code
val _isLoading by produceState(false, isLoading) {
delay(Duration.milliseconds(500))
value = if (isLoading != value) {
isLoading
} else {
value
}
}