Package-level declarations

Properties

Link copied to clipboard

Convenience wrapper for dark mode checking

Functions

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

Check for permissions.

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

Observe a Flow and execute an action when the value is changed.

Link copied to clipboard

Registers listener for configuration changes to retrieve whether system is in dark theme or not. Immediately upon subscribing, it sends the current value and then registers listener for changes.

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

Observe a LiveData and execute an action when the value is changed.

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

Observe a LiveData and execute an action when the value is changed.

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

Launch an activity for permission.

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

Launch an activity for result.