commonMain.com.paoapps.fifi.utils.flow.FlowRefreshTrigger.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fifi-framework Show documentation
Show all versions of fifi-framework Show documentation
Kotlin Multiplatform Mobile framework for optimal code sharing between iOS and Android.
package com.paoapps.fifi.utils.flow
import kotlin.random.Random
sealed class FlowRefreshTrigger {
data class FromCache(private val id: String = Random.nextInt().toString()) : FlowRefreshTrigger()
/**
* Every instance has a unique id so the refresh StateFlow sees it as a new value.
* StateFlow does not emit the same value twice if the current value is the same as the new value.
*/
data class Refresh(private val id: String = Random.nextInt().toString()) : FlowRefreshTrigger()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy