SharedPreferencesMigration

DataMigration instance for migrating from SharedPreferences to DataStore.

Constructors

Link copied to clipboard
fun <T> SharedPreferencesMigration(    produceSharedPreferences: () -> SharedPreferences,     keysToMigrate: Set<String> = MIGRATE_ALL_KEYS,     shouldRunMigration: suspend (T) -> Boolean = { true },     migrate: suspend (SharedPreferencesView, T) -> T)

DataMigration from SharedPreferences to DataStore.

Link copied to clipboard
fun <T> SharedPreferencesMigration(    context: Context,     sharedPreferencesName: String,     keysToMigrate: Set<String> = MIGRATE_ALL_KEYS,     shouldRunMigration: suspend (T) -> Boolean = { true },     migrate: suspend (SharedPreferencesView, T) -> T)

DataMigration from SharedPreferences to DataStore.

Functions

Link copied to clipboard
open suspend override fun cleanUp()
Link copied to clipboard
open suspend override fun migrate(currentData: T): T
Link copied to clipboard
open suspend override fun shouldMigrate(currentData: T): Boolean