Suppose that I have a datastore that contains some booleanPrefrencesKey
val Context.dataStore: DataStore<Preferences> by preferencesDataStore(name = "settings")
I want to get all the keys that its value is true:
suspend fun getTrueKeys(): Set<Preferences.Key<*>>? {
...
}
How can I achieve that? Thanks
One possible approach that I can think of, keep all your keys in list like: