Created
September 6, 2022 06:00
-
-
Save meet30997/300cfd76aeb99dd292871937819664cb to your computer and use it in GitHub Desktop.
Migrate Shared Preference To DataStore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val Context.dataStore: DataStore<Preferences> by preferencesDataStore( | |
name = "MyDataStore", | |
produceMigrations = { context -> | |
listOf( | |
SharedPreferencesMigration(context, "MySharedPref") | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment