Package-level declarations

Properties

Link copied to clipboard

Extension property to check if the system is currently in dark theme mode.

Functions

Link copied to clipboard
inline fun ComponentActivity.checkForPermissions(permissions: List<String>, crossinline onSuccess: () -> Unit)

Checks and requests permissions with automatic settings navigation on denial.

Link copied to clipboard
inline fun <T> LifecycleOwner.collectWithLifecycle(flow: Flow<T>, crossinline action: (T) -> Unit)

Collects a Flow in a lifecycle-aware manner, automatically canceling when lifecycle stops.

Link copied to clipboard

Observes system dark theme changes as a reactive Flow.

Link copied to clipboard
inline fun <T> LifecycleOwner.observe(liveData: LiveData<T>, crossinline action: (T) -> Unit)

Observes a LiveData and executes an action when non-null values are emitted.

Link copied to clipboard
inline fun <T> LifecycleOwner.observeEvent(liveData: LiveData<OneTimeEvent<T>>, crossinline action: (T) -> Unit)

Observes a LiveData containing OneTimeEvents and consumes unhandled events.

inline fun <T> LifecycleOwner.observeEvent(liveData: MutableLiveData<OneTimeEvent<T>>, crossinline action: (T) -> Unit)

Observes a MutableLiveData containing OneTimeEvents and consumes unhandled events.

Link copied to clipboard

Opens the system app settings page for this application.

Link copied to clipboard
inline fun ComponentActivity.permissionLauncher(crossinline onSuccess: () -> Unit = {}, crossinline onFailure: () -> Unit = {}): ActivityResultLauncher<Array<String>>

Creates a permission request launcher with typed success/failure callbacks.

Link copied to clipboard
inline fun ComponentActivity.resultLauncher(crossinline onSuccess: () -> Unit = {}, crossinline onFailure: () -> Unit = {}): ActivityResultLauncher<Intent>

Creates an activity result launcher with typed success/failure callbacks.