dateTimeToString static method

String dateTimeToString({
  1. required DateTime date,
  2. String format = Format.fyyyyMMdd,
})

convert date (DateTime to String)

Implementation

static String dateTimeToString(
    {required DateTime date, String format = Format.fyyyyMMdd}) {
  return DateFormat(format).format(date);
}