我想在 Firebase 中自動加一。如果用戶發送訊息,Firebase 內部的資料將加一。
我將不勝感激任何幫助。
uj5u.com熱心網友回復:
使用 FieldValue.increment()
FirebaseFirestore.instance
.collection('users')
.doc('ABC123')
.update({'count': FieldValue.increment( 1)})
或使用交易
或使用云觸發器
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/432516.html
