increment static method

Object increment(
  1. num delta
)

Adds delta to the number stored at the location when the server applies the write: the placeholder {'.sv': {'increment': delta}}. A location that holds no number is treated as 0. A NaN or infinite delta is not checked here: the write that holds it throws an ArgumentError.

Writes are at least once: when the acknowledgement of a write is lost and the client sends it again after reconnecting, the increment is applied twice.

Implementation

static Object increment(num delta) => <String, Object?>{
  '.sv': <String, Object?>{'increment': delta},
};