//MetaPhrase/com.github.diegoberaldin.metaphrase.core.common.utils
Package-level declarations
Types
Name | Summary |
---|---|
Constants | [jvm] object Constants Global constants. |
LruCache | [jvm] class LruCache<T>(size: Int) A simple implementation of an LRU cache. |
Functions
Name | Summary |
---|---|
activeAsFlow | [jvm] inline fun <T> Value<ChildStack<*, *>>.activeAsFlow(withNullsIfNotInstance: Boolean = false, timeout: Duration = 500.milliseconds): Flow<T?> Observe the instance of a child stack as a flow. |
activeConfigAsFlow | [jvm] inline fun <C> Value<ChildStack<*, *>>.activeConfigAsFlow(): Flow<C?> Observe the configuration of a child stack as a flow. |
asFlow | [jvm] inline fun <T> Value<ChildSlot<*, *>>.asFlow(withNullsIfNotInstance: Boolean = false, timeout: Duration = 500.milliseconds): Flow<T?> Observe the instance of a child slot as a flow. |
combine | [jvm] inline fun <T1, T2, T3, T4, T5, T6, R> combine(flow: Flow<T1>, flow2: Flow<T2>, flow3: Flow<T3>, flow4: Flow<T4>, flow5: Flow<T5>, flow6: Flow<T6>, crossinline transform: suspend (T1, T2, T3, T4, T5, T6) -> R): Flow<R> Combine utility to handle more than 5 flows. |
configAsFlow | [jvm] inline fun <C> Value<ChildSlot<*, *>>.configAsFlow(): Flow<C?> Observe the configuration of a child slot as a flow. |
getByInjection | [jvm] inline fun <T> getByInjection(): T Utility to inject dependencies outside a module scope. [jvm] inline fun <T> getByInjection(vararg params: Any?): T Utility to inject dependencies outside a module scope with additional arguments. |
lastPathSegment | [jvm] fun String.lastPathSegment(): String Retrieves the last path segment (considering platform-specific separator). |
runOnUiThread | [jvm] fun <T> runOnUiThread(block: () -> T): T Helper to run a block on the UI thread. |
stripExtension | [jvm] fun String.stripExtension(): String Strip the extension from a file name |
toLocalPixel | [jvm] @Composable fun Dp.toLocalPixel(): Float Converts a device independent measure to local pixel accounting for local density. |
toRadians | [jvm] fun Float.toRadians(): Float Convert degrees to radians. |