Flutter app error - type 'Timestamp' is not a subtype of type 'DateTime'

后端 未结 14 1441
刺人心
刺人心 2020-12-16 12:49

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\'][\'         


        
14条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 13:29

    add toDate() method .It will work

    DateTime dateTime = documents[i].data["duedate"].toDate();
    

提交回复
热议问题