toDateStringWithFormatDDMMYYYY property

String get toDateStringWithFormatDDMMYYYY

Implementation

String get toDateStringWithFormatDDMMYYYY {
  DateFormat dateFormat = DateFormat('dd/MM/yyyy');
  final date = DateTime.tryParse(this);
  if (date != null) {
    return dateFormat.format(date);
  } else {
    return 'wrong-date-format';
  }
}