Hello, Do I need any special dependency to use Sha...
# android
s
Hello, Do I need any special dependency to use SharedFlow? I'm checking some examples but I get an error when creating MutableSharedFlow with parameters.
Copy code
MutableSharedFlow<Unit>(replay = 0)
K 1
my mistake
Copy code
private var selectedSaleCategoryFlow = MutableSharedFlow<SaleCategory>(replay = 0)
j
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
You may also consider using the immutable ref
val
👍 1
s
Yes it's good idea.