set

suspend fun <T> Context.set(key: Preferences.Key<T>, value: T)

Updates the value at key with value.

Author

Arnau Mora

Since

20220829

See also

Parameters

key

The preferences key to update.

value

The value to set at key.


fun <T> AndroidViewModel.set(key: Preferences.Key<T>, value: T): Job

Updates the value at key with value using the scope of the view model.

Author

Arnau Mora

Since

20220829

See also

Parameters

key

The preferences key to update.

value

The value to set at key.