Nested Field Firestore Update - FLUTTER

PHOTO EMBED

Fri Jun 17 2022 15:44:27 GMT+0000 (UTC)

Saved by @jaystiqs #dart

var collection = FirebaseFirestore.instance.collection('collection');
collection 
    .doc('doc_id')
    .update({'key.foo.bar' : 'nested_value'}) // <-- Nested value
    .then((_) => print('Success'))
    .catchError((error) => print('Failed: $error'));
content_copyCOPY