1.String-->DateTime:
DateTime.parse(String);
2.DateTime -->formatString:
formatDate(DateTime ,[yyyy,'-',mm,'-',dd]);
formatDate源码:
https://github.com/tejainece/date_format/blob/master/lib/src/date_format_base.dart
用法:
https://github.com/tejainece/date_format/blob/master/example/date_format_example.dart
参考:
https://github.com/tejainece/date_format