addUnique method

void addUnique(
  1. String key,
  2. dynamic value
)

Atomically add value to the array key, only if not already present.

The position of the insert is not guaranteed.

Implementation

void addUnique(String key, dynamic value) {
  if (isNullOrEmpty(key)) {
    throw ArgumentError.notNull('key');
  }
  if (value == null) {
    throw ArgumentError.notNull('value');
  }
  _LCAddUniqueOperation op = new _LCAddUniqueOperation([value]);
  _applyOperation(key, op);
}