I\'m fetching data cloud firestore & trying to show in my app by using the following piece of code.
new Text(timeago.format(document.data[\'tripDoc\'][\'
Try document.data["data"].microsecondsSinceEpoch
document.data["data"].microsecondsSinceEpoch
This is working for me:-
User.fromDocument(DocumentSnapshot document){ dataNasc = DateTime.fromMicrosecondsSinceEpoch(document.data["data"].microsecondsSinceEpoch); }