Add a new value to the existing document Firestore - FLUTTER

PHOTO EMBED

Fri Jun 17 2022 15:46:07 GMT+0000 (UTC)

Saved by @jaystiqs #dart

var collection = FirebaseFirestore.instance.collection('collection');
collection
    .doc('doc_id')
    .set({'payment_customer_id': customerResponse!.data.customerId, }, SetOptions(merge: true)); // <-- Set merge to true.
content_copyCOPY