Migrate from RxJava to Kotlin Coroutine and Flows

First things first

Setup and add required dependencies in your gradle or pom file:

https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core

Problems with Retrofit2

If you are using an older version of Retrofit than 2.6.0 then you have to add the Kotlin Coroutine Adapter: https://github.com/JakeWharton/retrofit2-kotlin-coroutines-adapter

Last updated