final DateTime now = DateTime.now();
final DateFormat formatter = DateFormat('dd-MM-yyyy');
final String formatted = formatter.format(now);
return formatted;
于 2021-02-05T10:14:02.850 回答
This answer is useful
0
String date = DateFormat.yMd().format('your date here');