kotlin coroutines launch code example
Example 1: coroutines kotlin android dependency
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
}
Example 2: kotlin coroutine invoke completion
fun getData(){
uiScope.launch{
dataRepository.getData()
}.invokeOnCompletion{
Log.d("Tag","Called after completion")
}
}