arrayUnion static method

bool arrayUnion(
  1. String key,
  2. Iterable value, {
  3. Object? options,
})

Implementation

static bool arrayUnion(String key, Iterable value, {Object? options}) {
  try {
    Set current = Set.of(get(key, [], options: options));
    current.addAll(value);
    return set(key, current.toList(), options: options);
  } catch (msg) {
    _log(msg);
    return false;
  }
}