Question: I'm switching from RTD to Firestore so I'm very new to the new db. I'm trying to add values to a document's field(array) `orders` using `FieldValue.arrayUnion` but I get `The argument type 'int' can't be assigned to the parameter type 'List<dynamic>'.`.
what am I doing wrong?
Many thanks.

```
// User collection
    _firestore
    .collection('Users')
    .doc(_firebaseAuth.currentUser.uid)
    .update({'orders': FieldValue.arrayUnion(order.orderId)});

```

Answer: 
[`arrayUnion`](https://github.com/FirebaseExtended/flutterfire/blob/master/packages/cloud_firestore/cloud_firestore/lib/src/field_value.dart#L26) takes a list as an argument and not an int, therefore try the following:

```
.update({'orders': FieldValue.arrayUnion([order.orderId])});

```
..found it.. you need to pass the value to append as List..so adding square brackets fixed it..

```
_firestore
    .collection('Users')
    .doc(_firebaseAuth.currentUser.uid)
    .update({'orders': FieldValue.arrayUnion([order.orderId])});

```