arrayUnion method
update field
realtime value
tells the server to union
the given elements
with any array value that already exists on the server.
Implementation
Future<void> arrayUnion({
required String field,
required List<dynamic> elements,
String? docId,
}) async {
return await this
.update(docId: docId, data: {field: FieldValue.arrayUnion(elements)});
}