formatDateTime method

String formatDateTime({
  1. required String format,
})

Implementation

String formatDateTime({required String format}) {
  var formatter = DateFormat(
    format.isEmpty ? _defaultDateTimeFormat : format,
  );
  return formatter.format((this.toLocal()).toLocal());
}