CacheableFlowWithInput

class CacheableFlowWithInput<TInput : CacheableInput.FlowInput, TData, TError : Throwable>(coroutineScope: CoroutineScope, launchFlow: (input: TInput) -> Flow<TData?>, startingCacheKey: TInput? = null, cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, initialFetchState: FetchState = FetchState.IDLE)

Constructors

Link copied to clipboard
constructor(coroutineScope: CoroutineScope, launchFlow: (input: TInput) -> Flow<TData?>, startingCacheKey: TInput? = null, cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, initialFetchState: FetchState = FetchState.IDLE)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
operator fun component1(): StateFlow<CacheableFlowResult<TData, TError>>
Link copied to clipboard
suspend fun launch(queryInput: TInput, onEachSuccess: suspend (TData) -> Unit? = null, onError: suspend (TError) -> Unit? = null)