``` fun fetchData() { isLoading.value = ...
# test
c
Copy code
fun fetchData() {
        isLoading.value = true
        this.launch(context = coroutineContext) {
            useCase.execute {
                onComplete { it ->
                    // do some stuff with it
                    isLoading.value = false
                }
                onError {
                    isLoading.value = false
                }
                onCancel {
                    isLoading.value = false
                }
            }
        }
    }