set

open suspend override fun set(key: String, content: Any)

Sets the value for the given key in DataStore. The content is converted to a String. This operation is performed asynchronously.

Parameters

key

The key for which to set the value.

content

The value to be set. It will be stored as a String.