Package-level declarations

Types

Link copied to clipboard
class FlowState<T>(initial: T, internalScope: CoroutineScope = CoroutineScope(Dispatchers.Default)) : SpecialMutableStateFlow<T>

This type works like MutableState, kotlinx.coroutines.flow.StateFlow and kotlinx.coroutines.flow.MutableSharedFlow. Based on SpecialMutableStateFlow

Functions

Link copied to clipboard
inline fun <T> Flow<List<T>>.asComposeList(scope: CoroutineScope, useContextOnChange: CoroutineContext? = Dispatchers.Main, noinline onException: ExceptionHandler<List<T>?> = defaultSafelyWithoutExceptionHandlerWithNull): List<T>

In fact, it is just classcast of asMutableComposeListState to List

Link copied to clipboard
inline fun <T> StateFlow<T>.asComposeState(scope: CoroutineScope, useContextOnChange: CoroutineContext? = Dispatchers.Main, noinline onException: ExceptionHandler<T?> = defaultSafelyWithoutExceptionHandlerWithNull): <Error class: unknown class><T>

Will map this as State. This conversation will pass its StateFlow.value as the first value

fun <T> Flow<T>.asComposeState(initial: T, scope: CoroutineScope, useContextOnChange: CoroutineContext? = Dispatchers.Main, onException: ExceptionHandler<T?> = defaultSafelyWithoutExceptionHandlerWithNull): <Error class: unknown class><T>

Will create MutableState using asMutableComposeState and use asState to convert it as immutable state

Link copied to clipboard
inline fun <T> Flow<List<T>>.asMutableComposeListState(scope: CoroutineScope, useContextOnChange: CoroutineContext? = Dispatchers.Main, noinline onException: ExceptionHandler<List<T>?> = defaultSafelyWithoutExceptionHandlerWithNull): <Error class: unknown class><T>

Each value of this will trigger applyDiff to the result SnapshotStateList

Link copied to clipboard
inline fun <T> StateFlow<T>.asMutableComposeState(scope: CoroutineScope, useContextOnChange: CoroutineContext? = Dispatchers.Main, noinline onException: ExceptionHandler<T?> = defaultSafelyWithoutExceptionHandlerWithNull): <Error class: unknown class><T>

Will map this as MutableState. Returned MutableState WILL NOT change source StateFlow. This conversation will pass its StateFlow.value as the first value

fun <T> Flow<T>.asMutableComposeState(initial: T, scope: CoroutineScope, useContextOnChange: CoroutineContext? = Dispatchers.Main, onException: ExceptionHandler<T?> = defaultSafelyWithoutExceptionHandlerWithNull): <Error class: unknown class><T>

Will map this as MutableState. Returned MutableState WILL NOT change source Flow

Link copied to clipboard
fun <Error class: unknown class>.linkWithContext(coroutineContext: CoroutineContext): <Error class: unknown class>
Link copied to clipboard
fun <Error class: unknown class>.linkWithJob(job: Job)
Link copied to clipboard
suspend fun <TElement : Element> renderComposableAndLinkToContext(root: TElement, monotonicFrameClock: <Error class: unknown class> = DefaultMonotonicFrameClock, content: <Error class: unknown class><TElement>.() -> Unit): <Error class: unknown class>
Link copied to clipboard
suspend fun <TElement : Element> renderComposableAndLinkToContextAndRoot(root: TElement, monotonicFrameClock: <Error class: unknown class> = DefaultMonotonicFrameClock, content: <Error class: unknown class><TElement>.() -> Unit): <Error class: unknown class>