formatDate method

String formatDate(
  1. String dateString
)

Implementation

String formatDate(String dateString) {
  var date = DateTime.tryParse(dateString) ?? DateTime.now();
  return '${date.day}/${date.month}/${date.year}';
}