【发布时间】:2021-02-19 12:34:20
【问题描述】:
我将下面显示的地图保存到 Firestore,但我还想保存一个时间戳,该时间戳应该包含用户使用日期和时间选择器选择的时间和日期。日期已经采用“dd.MM.yyyy”格式,时间类似于“6:58 PM”。日期是变量date,时间是变量time。如何保存值为time 和date 的时间戳?
Map<String, dynamic> data = {
'name': userName,
'userUID': userUIDglobal,
'time: '//here I want to safe the timestamp
};
Firestore.instance
.collection('seller')
.document(documentID)
.collection('test')
.add(data);
}
【问题讨论】:
标签: flutter dart google-cloud-firestore timestamp