Flutter Firestore 服务器端时间戳 [英] Flutter Firestore Server side Timestamp

查看:33
本文介绍了Flutter Firestore 服务器端时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在使用 Flutter 应用程序添加到 Firestore 的新文档上添加服务器端时间戳.我知道我应该使用 FieldValue.serverTimestamp 但我不确定在哪里可以找到它.

I need to add a server side timestamp on new documents added to Firestore using a Flutter app. I see I am supposed to use FieldValue.serverTimestamp but I am not sure where to find this.

推荐答案

截至 9 月 5 日,更新的 cloud_firestore v0.8.0 库现在具有 FieldValue.serverTimestamp().宇宙现在一切都很好

As of September 5th, the updated cloud_firestore v0.8.0 library now has FieldValue.serverTimestamp(). All is now well in the universe

这篇关于Flutter Firestore 服务器端时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆