如何在FirebaseDatabase插件中为Flutter使用ServerValue [英] How to use ServerValue in FirebaseDatabase plugin for Flutter

查看:80
本文介绍了如何在FirebaseDatabase插件中为Flutter使用ServerValue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在此页面上使用ServerValue 此处,他们说时间戳是为firebase_database实现的.

How to use the ServerValue on this page and here they say the timestamp is implemented for firebase_database

推荐答案

使用ServerValue.timestamp设置时间

Use ServerValue.timestamp to set time

   DatabaseReference.set({
  'time': ServerValue.timestamp,
}).

这篇关于如何在FirebaseDatabase插件中为Flutter使用ServerValue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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