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
First we create a function to get all available keys and can modify the solution of @rasfarr5 to filter these key