All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.paoapps.fifi.utils.flow.FlowRefreshTrigger.kt Maven / Gradle / Ivy

Go to download

Kotlin Multiplatform Mobile framework for optimal code sharing between iOS and Android.

There is a newer version: 0.0.31
Show newest version
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