Package-level declarations

Types

Link copied to clipboard
interface AmbBuilder<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface Completable

Represents a completable that can be completed, executing all deferred actions in reverse order of their registration.

Link copied to clipboard
Link copied to clipboard
interface DeferrableScope
Link copied to clipboard
Represents a disposable resource.
Link copied to clipboard
Disposes of multiple disposables
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class GenericSpanInfo(tag: Any, start: Int, end: Int, flags: Int) : SpanInfo
Link copied to clipboard
open class Heartbeat<Data>
Periodically calls a runnable on a specifier Handler.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class MappedDataclassBinding<Dataclass, T>(val flow: Flow<T>, val updateFunction: Dataclass.(T) -> Dataclass)
Link copied to clipboard
abstract class ParcelableSerializer<T : Parcelable> : KSerializer<T>
Link copied to clipboard
object RectSerializer : KSerializer<Rect>
Link copied to clipboard

Helper interface that both marks the class as AutoCloseable and calls close on all AutoCloseable members.

Link copied to clipboard

Java/Kotlin interop result wrapper for use in function overrides between Java and Kotlin. Can be converted to/from kotlin.Result and used in both languages.

Link copied to clipboard
class SelectionSpanInfo(start: Int, end: Int, startFlags: Int, endFlags: Int) : SpanInfo
Link copied to clipboard
interface SendProducerScope<T> : ProducerScope<T>
Link copied to clipboard
abstract class SpanInfo(var start: Int, var end: Int)
Link copied to clipboard

Reported by await when the task itself was cancelled, as opposed to the coroutine awaiting it.

Link copied to clipboard
class UriFilter

Filter helper for filtering uris with (or without) particular requirements, conditions or patterns.

Properties

Link copied to clipboard
val WhileUiSubscribed: SharingStarted

A SharingStarted meant to be used with a StateFlow to expose data to the UI.

Functions

Link copied to clipboard
suspend fun <T> amb(block: suspend AmbBuilder<T>.() -> Unit): T
Link copied to clipboard
suspend fun <T> ambOf(tasks: List<suspend () -> T>): T
suspend fun <T> ambOf(vararg tasks: suspend () -> T): T
Link copied to clipboard
suspend fun <T> Task<T>.await(): Result<T>

Awaits this task without ever throwing: success, failure and cancellation all arrive as a Result, the last as a failure carrying TaskCancellation.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun <T> ProducerScope<T>.awaitSend(block: suspend SendProducerScope<T>.() -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun CoroutineScope.buildCompletable(): Completable

fun CoroutineScope.buildCompletable(action: CompletableBuilder.() -> Unit): Completable

Builds a completable that can be completed, executing all deferred actions in reverse order of their registration.

Link copied to clipboard
Link copied to clipboard
fun String.capitalize(locale: Locale = Locale.getDefault()): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun CoroutineScope.childJobScope(context: CoroutineContext = EmptyCoroutineContext): CoroutineScope

Creates a new CoroutineScope with a Job that is a child of the current scope's job. This allows for launching coroutines that are cancelled when the parent scope is cancelled.

Link copied to clipboard
fun CoroutineScope.childSupervisorJobScope(context: CoroutineContext = EmptyCoroutineContext): CoroutineScope

Creates a new CoroutineScope with a SupervisorJob that is a child of the current scope's job. This allows for launching coroutines that can fail independently of the parent scope.

Link copied to clipboard
fun <T> List<T>.clampedSubList(fromIndex: Int, toIndex: Int): List<T>
Link copied to clipboard
fun <T> closeAutoCloseable(data: T)

Closes all AutoCloseable members of the data.

Link copied to clipboard

Closes all AutoCloseable members of the class.

Link copied to clipboard
fun <T1, R> combine(flow: Flow<T1>, transform: suspend (T1) -> R): Flow<R>
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>, transform: suspend (T1, T2, T3, T4, T5, T6) -> R): Flow<R>
fun <T1, T2, T3, T4, T5, T6, T7, R> combine(flow: Flow<T1>, flow2: Flow<T2>, flow3: Flow<T3>, flow4: Flow<T4>, flow5: Flow<T5>, flow6: Flow<T6>, flow7: Flow<T7>, transform: suspend (T1, T2, T3, T4, T5, T6, T7) -> R): Flow<R>
fun <T1, T2, T3, T4, T5, T6, T7, T8, R> combine(flow: Flow<T1>, flow2: Flow<T2>, flow3: Flow<T3>, flow4: Flow<T4>, flow5: Flow<T5>, flow6: Flow<T6>, flow7: Flow<T7>, flow8: Flow<T8>, transform: suspend (T1, T2, T3, T4, T5, T6, T7, T8) -> R): Flow<R>
fun <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> combine(flow: Flow<T1>, flow2: Flow<T2>, flow3: Flow<T3>, flow4: Flow<T4>, flow5: Flow<T5>, flow6: Flow<T6>, flow7: Flow<T7>, flow8: Flow<T8>, flow9: Flow<T9>, transform: suspend (T1, T2, T3, T4, T5, T6, T7, T8, T9) -> R): Flow<R>
Link copied to clipboard
inline fun <T> Iterable<Flow<T>>.combineFlatten(): Flow<List<T>>

Combines iterable collection of flows and flattens it into single flow of emitted values list. List> -> Flow>

Link copied to clipboard
Link copied to clipboard
fun <T> Flow<T>.debounceUntilCount(timeoutMillis: Long, count: Int): Flow<T>
Link copied to clipboard
fun <T> Flow<T>.delayAtLeast(duration: Duration, condition: (T) -> Boolean = { true }): Flow<T>

Ensures each emitted item is held for at least duration from the moment this flow is collected.

Link copied to clipboard
Link copied to clipboard
fun InputStream.encodeAsString(encoderFlag: Int = Base64.NO_WRAP): String
Link copied to clipboard
fun FAIL(message: String? = null): Nothing
Link copied to clipboard
fun Flow<Boolean>.filter(): Flow<Boolean>

Keeps only the true emissions, for flows that already are the predicate.

fun Bundle.filter(action: (String, Bundle) -> Boolean): Bundle
Link copied to clipboard
fun <K, V> Map<out K, V>.filterKeys(keys: List<K>): Map<K, V>
Link copied to clipboard
fun Flow<Boolean>.filterNot(): Flow<Boolean>

Keeps only the false emissions, for flows that already are the predicate.

Link copied to clipboard
fun <K, V> Map<out K, V>.filterNotKeys(keys: List<K>): Map<K, V>
Link copied to clipboard
fun <T> Flow<Result<T>>.filterSuccess(failureConsumer: (Result<T>) -> Unit? = null): Flow<T>
Link copied to clipboard
inline fun <R> Iterable<*>.findInstance(): R?
Link copied to clipboard
fun <K, V> Map<K, V>.firstKeyByKeyOrNull(predicate: (K) -> Boolean): K?
Link copied to clipboard
fun <K, V> Map<K, V>.firstValueByKeyOrNull(predicate: (K) -> Boolean): V?
Link copied to clipboard
@ExperimentalCoroutinesApi
inline fun <T, R> Flow<T?>.flatMapLatestOrEmpty(crossinline transform: suspend (value: T) -> Flow<R?>): Flow<R?>
Link copied to clipboard
@ExperimentalCoroutinesApi
inline fun <T, R> Flow<T?>.flatMapLatestOrEmptyCollection(crossinline transform: suspend (value: T) -> Flow<Collection<R>>): Flow<Collection<R>>
Link copied to clipboard
@ExperimentalCoroutinesApi
inline fun <T, R> Flow<T?>.flatMapLatestOrNull(crossinline transform: suspend (value: T) -> Flow<R?>): Flow<R?>
Link copied to clipboard
fun <T> Flow<Collection<T>>.fromSingleton(): Flow<T>
Link copied to clipboard
fun <T> Flow<Collection<T>>.fromSingletonNonNull(): Flow<T>
Link copied to clipboard
fun <T> Flow<Collection<T>>.fromSingletonOrNull(): Flow<T?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getFileNameFromUri(context: Context, uri: Uri): String?
Link copied to clipboard
fun getMimeType(fileName: String): String
fun getMimeType(context: Context, contentUri: Uri): String?
Link copied to clipboard
Link copied to clipboard
inline operator fun <T> Context.getValue(thisRef: Nothing?, property: KProperty<*>): T
Link copied to clipboard
inline fun <T> List<T>.ifNotEmpty(action: (List<T>) -> Unit)
Link copied to clipboard
fun CoroutineScope.invokeOnCompletion(block: (cause: Throwable?) -> Unit): DisposableHandle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> Flow<T>.logEach(): Flow<T>
Link copied to clipboard
fun <T> loopFlow(block: suspend FlowCollector<T>.() -> Unit): Flow<T>
Link copied to clipboard
fun <T, R : Any> Optional<T>.mapNonNull(mapper: (T) -> R?): Optional<R>
Link copied to clipboard
fun <T, K> StateFlow<T>.mapState(scope: CoroutineScope, transform: (data: T) -> K): StateFlow<K>
Link copied to clipboard
fun <T> nullFlow(): Flow<T?>
Link copied to clipboard
Link copied to clipboard
fun <T> LiveData<T>.observeDisposing(lifecycleOwner: LifecycleOwner, observer: Observer<T>): Disposable
fun <T> FluentLiveData<T>.observeDisposing(lifecycleOwner: LifecycleOwner, observer: Observer<T>): Disposable
Link copied to clipboard
suspend fun onCancellation(action: () -> Unit): Nothing
Link copied to clipboard
fun <T> Flow<T>.onCancellation(action: suspend FlowCollector<T>.() -> Unit): Flow<T>
Link copied to clipboard
fun <T> Flow<T>.once(): Flow<T>
Link copied to clipboard

Parses a color string in the format of #RGB, #ARGB, #RRGGBB, or #AARRGGBB, or a named color (e.g., "red", "blue", etc.).

Link copied to clipboard
fun String.parseColorString(format: ColorHexFormat = ColorHexFormat.ARGB): Int?

Parses a color string in either a hex (#RGB, #RGBA, #ARGB, #RRGGBB, #RRGGBBAA, or #AARRGGBB) or a named color (e.g., "red", "blue", etc.).

Link copied to clipboard
fun parseFileName(rawName: String, mimeType: String): String
fun parseFileName(context: Context, rawName: String, uri: Uri): String
Link copied to clipboard
Link copied to clipboard

Parses a color string in the format of #RGB, #RGBA, #RRGGBB, or #RRGGBBAA, or a named color (e.g., "red", "blue", etc.).

Link copied to clipboard
fun Handler.repeatEvery(duration: Duration, action: () -> Unit)
Link copied to clipboard
suspend fun <T> StateFlow<T>.repeatOn(predicate: (T) -> Boolean, restartOnStateChange: Boolean = false, action: CoroutineScope.(T) -> Unit)
Link copied to clipboard
suspend fun <T : Enum<T>> StateFlow<T>.repeatOnState(vararg states: T, restartOnStateChange: Boolean = false, action: CoroutineScope.(T) -> Unit)
Link copied to clipboard
inline suspend fun runOnFailure(crossinline onFailure: (Throwable) -> Unit, crossinline block: suspend () -> Unit)

Executes block and invokes onFailure if it throws. Rethrows CancellationException after calling onFailure so structured concurrency is preserved.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> stackOf(vararg elements: T): ArrayDeque<T>
Link copied to clipboard
fun TEST_ONLY(message: String? = null): Nothing
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Context.toPx(dp: Int): Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard