PreferencesDataStoreImpl

class PreferencesDataStoreImpl @Inject constructor(dataStore: DataStore<Preferences>) : PreferencesDataStore

Implementation of PreferencesDataStore using DataStore<Preferences>. This class is responsible for implementing the abstract methods defined in PreferencesDataStore.

Constructors

Link copied to clipboard
@Inject
constructor(dataStore: DataStore<Preferences>)

Functions

Link copied to clipboard
open suspend override fun getIncrementalCounter(): Int

Retrieve the incremental counter from the data store and increments it by 1. It then stores the incremented value back into the data store.