ditto / live.ditto / DittoMutableDocumentPath / set

set

@JvmOverloads fun set(value: Any, isDefault: Boolean = false): Unit

Set a value at the document's key defined by the preceding subscripting.

Parameters

value - the value to set at the subscripting-defined document key.

isDefault - represents whether or not the value should be set as a default value. Set this to true if you want to set a default value that you expect to be overwritten by other devices in the network. The default value is false.

Exceptions

DittoError - Thrown if trying to update the document at an invalid key.