Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
i use this result to avoid the pain of multiple when's. I have a 'base view model' that extends the conventional one that has this function: protected fun vmLaunch(block: suspend () -> Unit){ viewModelScope.launch { onLoading?.invoke(true) block() onLoading?.invoke(false) } } To wrap the loading. Then the use of that ends up looking like: vmLaunch { streamingRepository.authForStreaming(deviceEntity) .onSuccess {} .onFailure {} }
NOTE:
The number of mentions on this list indicates mentions on common posts plus user suggested alternatives.
Hence, a higher number means a more popular project.