put method

void put(
  1. K key,
  2. V value
)

Puts value for key in the map, producing a unique tag.

If the key already exists, this creates a new tag for the new value, effectively updating the key's value. The tag is pseudo-causal, derived from the current document clock and peer id.

Implementation

void put(K key, V value) {
  final operation = _ORMapPutOperation<K, V>.fromHandler(
    this,
    key: key,
    value: value,
    tag: _tag(),
  );
  doc.registerOperation(operation);
}