arrayUnion static method

FieldValue arrayUnion(
  1. List elements
)

Returns a FieldValue that tells the server to union the given elements with any array value that already exists on the server.

Each specified element that doesn't already exist in the array will be added to the end. If the field being modified is not already an array it will be overwritten with an array containing exactly the specified elements.

Implementation

static FieldValue arrayUnion(List<dynamic> elements) =>
    FieldValue._(_factory.arrayUnion(_CodecUtility.valueEncode(elements)));