# dev.inmo.micro_utils.coroutines.compose

# Package-level declarations

## Types

StyleSheetsAggregator
Link copied to clipboard
object StyleSheetsAggregator

Aggregator of Compose CSS StyleSheet. Allowing to add StyleSheet in it and draw it in one place without requiring to add `Style(stylesheet)` on every compose function call

## Functions

asComposeList
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

asComposeState
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

asMutableComposeListState
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

asMutableComposeState
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

enableStyleSheetsAggregator
Link copied to clipboard
fun enableStyleSheetsAggregator (stylesPreset: Set <<Error class: unknown class>> = emptySet())

Drawing StyleSheetsAggregator in place. You may pass Set of CSSRulesHolder/StyleSheets as preset of styles

includeInStyleSheetsAggregator
Link copied to clipboard
fun <Error class: unknown class>. includeInStyleSheetsAggregator ()

Will include CSSRulesHolder/StyleSheet in the StyleSheetsAggregator using its StyleSheetsAggregator.addStyleSheet

linkWithContext
Link copied to clipboard
fun <Error class: unknown class>. linkWithContext (coroutineContext: CoroutineContext ): <Error class: unknown class>
linkWithJob
Link copied to clipboard
fun <Error class: unknown class>. linkWithJob (job: Job)
renderComposableAndLinkToContext
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>
renderComposableAndLinkToContextAndRoot
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>