Alex Maryin
Jun 2, 2021

I think you can skip selecting IO dispatcher because it already applied under the hood of DataStore.

I use collect terminal operator for this flow, also use map if need to manipulate with saved settings, transform if I need emit other flow which require to read settings. I use take(1) operator if the function read settings as well as write it back, for avoid to recycling of collecting new emitted flow.

Alex Maryin
Alex Maryin

Written by Alex Maryin

My profession is lawyer, but I like programming for a whole my life. It started since 90's with ZX-spectrum, and now I fan of Kotlin, Python, Pascal & C++.

Responses (1)