kotlin coroutine invoke completion code example
Example: kotlin coroutine invoke completion
fun getData(){
uiScope.launch{
dataRepository.getData()
}.invokeOnCompletion{
Log.d("Tag","Called after completion")
}
}
fun getData(){
uiScope.launch{
dataRepository.getData()
}.invokeOnCompletion{
Log.d("Tag","Called after completion")
}
}