createPreferencesDataStore

fun createPreferencesDataStore(context: Context, dispatchers: CoroutineDispatchers, legacyName: String, fileName: String): DataStore<Preferences>(source)

legacyName is the SharedPreferences file this domain migrates from, fileName the DataStore file it lives in now. Both are on-disk identities — changing either orphans existing user data.