I have an app that receives some data from a api and i want to compare them, but dont know how to do it.
The date that comes from the api is in a different template, plus its a string, so i cant compare.
I want to show a error message if the received date is older than current date.
Here's how the api date comes (i have printed on console):
I/flutter ( 5190): 2004-08-26T01:00:00.000Z
And here is the DateTime.now on flutter:
I/flutter ( 5190): 2021-02-19 12:25:16.638505
Is there a way to compare them?