formatDate function
Implementation
String? formatDate(DateTime? date, {bool? en}) {
if (date == null) {
return null;
}
if (en == true) {
return DateFormat('MM/dd/yyyy').format(date);
} else {
return DateFormat('dd/MM/yyyy').format(date);
}
}