toDateTimeString method

String? toDateTimeString()

Format DateTime to DateTimeString - yyyy-MM-dd HH:mm:ss

Implementation

String? toDateTimeString() {
  if (this == null) return null;
  return intl.DateFormat("yyyy-MM-dd HH:mm:ss", _locale).format(this!);
}