Skip to content

Instantly share code, notes, and snippets.

@Nillerr
Created May 20, 2021 19:45
Show Gist options
  • Save Nillerr/cc2bbe0b1938d2efa58e8683419dd740 to your computer and use it in GitHub Desktop.
Save Nillerr/cc2bbe0b1938d2efa58e8683419dd740 to your computer and use it in GitHub Desktop.
interface TaskService {
val tasks: Flow<List<Task>>
fun tasks(onEach: (List<Task>) -> Unit, onCompletion: (Throwable?) -> Unit): Cancellable =
tasks.collect(onEach, onCompletion)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment