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

查看:101
本文介绍了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天全站免登陆