how to add or remove item to the the existing array in firestore ?

前端 未结 2 1647
梦毁少年i
梦毁少年i 2020-12-19 13:27

Firestore has recently add the new new method FieldValue.arrayUnion(value) and FieldValue.arrayRemove(value) but i couldn\'t find the implementation in flutter cloud_firesto

2条回答
  •  清酒与你
    2020-12-19 13:44

    Update: And now it seems that it is supported! With the version 0.8.0.

    https://pub.dartlang.org/packages/cloud_firestore

    And then use FieldValue.arrayUnion and FieldVale.arrayRemove.


    There doesn't seems to be a way currently. Please follow the following two github issues:

    https://github.com/flutter/flutter/issues/21148 https://github.com/flutter/flutter/issues/20688

提交回复
热议问题