Skip to content

[cloud_firestore] Can't add to list with transaction. Please Help. #23

Closed
@mike-gallego

Description

@mike-gallego

I tried many different ways but I cannot add to a placeholder list that I have. I followed exactly how the documentation handled it, too.

await Firestore.instance.collection('users').document(user.uid).setData({ 'ban_list': [], });

await tx.update(postRef, <String, dynamic>{ 'ban_list': postSnapshot.data['ban_list'] .add(listOfDocs[index]['id']) });

Annotation 2019-08-23 220202
Annotation 2019-08-23 220245

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions