android5-8 Exercise 2: An integer setting ====================================== private val maxShownKey = intPreferencesKey("max_notes_shown") val maxShown: Flow = dataStore.data.map { it[maxShownKey] ?: 50 } suspend fun setMaxShown(value: Int) { dataStore.edit { it[maxShownKey] = value } } Imports: androidx.datastore.preferences.core.intPreferencesKey. In the ViewModel: combine the new flow in (combine accepts more flows; with many, group some into a small data class first), then apply it: notes.take(maxShown). Control: a Slider or a row of buttons (10 / 50 / 100) calling viewModel::setMaxShown. Possible surprises (general knowledge): defaults live in the code, not the file, so changing the default later changes behaviour for users who never touched the setting; the more flows combined, the harder the state builder reads. Code unrun.