toFormattedDate method
Implementation
String toFormattedDate({String outputFormat = 'dd/MM/yyyy'}) {
if (isNotNullOrEmpty) {
try {
final date = DateTime.parse(this!);
return DateFormat(outputFormat).formatLocalized(date);
} catch (e) {
return this!;
}
} else {
return '';
}
}