dateToString function

String dateToString(
  1. DateTime date, {
  2. String pattern = "yyyy/MM/dd",
})

Implementation

String dateToString(DateTime date, {String pattern = "yyyy/MM/dd"}) {
  final fromFormatter = DateFormat(pattern);
  return fromFormatter.format(date);
}