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\'][\'
add toDate() method .It will work
DateTime dateTime = documents[i].data["duedate"].toDate();