Android, Jetpack, Jetpack Datastore.
logic effectively. Sample Code: class InMemoryDataStore(private val initialData: UserPreferences) : DataStore<UserPreferences> { private var currentData = initialData override suspend fun data(): UserPreferences { return currentData } override suspend fun updateData(updateBlock: suspend