Closed diegocarloslima closed 2 years ago
Yes should be like :
class UserPreferencesRepository(
private val userPreferencesStore: DataStore<Preferences>,
context: Context
) { ... }
Thank you, fix is underway. Issue can be tracked in #45
On the Working with Preferences DataStore codelab section 6. Persisting data in Preferences DataStore, there is the following snippet of code:
I guess the generics type should be
Preferences
and notUserPreferences
. Otherwise, it gives a type mismatch error when trying to instantiate theUserPreferencesRepository