aye aye good people, I'm really confused about the behavior of DateTime.parse();
on dartpad this works
void main() {
const String _iso8601 = '2019-04-01T08:30:00';
final DateTime _date = DateTime.parse(_iso8601);
print(_date.toIso8601String());
}
but in flutter doesn't, but this does
const String _iso8601 = '2019-04-01T08:30:00.000';
final DateTime _date = DateTime.parse(_iso8601);
I'm now in aqueduct and neither of those works including this
String _iso8601 = '2019-04-01T08:30:00Z';
please note that with "didn't work" I don't mean that it returns an error, but just a null.
[edit: correction
when I mock the string instead of mapping it from the body of a request it returns
Exception has occurred. FormatException (null)
but then again I'm using Iso8601]
If you have some experience with this situation I could use some help.
[edit: note that aqueduct runs on dart 2.0]
Thank you in advance, Francesco