toDateString method

String? toDateString()

Format DateTime to toDateString - yyyy-MM-dd

Implementation

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