dittosynckit / live.ditto / DittoMutableDocumentPath / increment

increment

fun increment(amount: Number): Unit

Increment a counter at the document's key defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is a counter.

Parameters

amount - the amount to increment the counter by. This can be a positive or a negative value.