How to get a boolean value from `dataStore Prefere...
# android
a
How to get a boolean value from 
dataStore Preference
 *synchronously*(one-shot) without delay?
r
Please try this library it's really owsome https://github.com/rajputmukesh748/EasyDataStore
No need to handle coroutines and it returns data fastly.
k
Your usecase might need something else then DataStore.
f
You can't. You could wrap the read call in a runBlocking call, but even then it's not guaranteed to be without delay because there is IO involved. The Legacy preferences wasn't without delay either, it was just that you didn't have an easy way to not block when calling the API.
👍 1
☝️ 1
a
It's very wired, when you replace
SharedPrefrence
with
dataStore
to optimize the process but actually you miss very basic requirement like this!
z
There's no such thing as “no delay”
117 Views