toDate method
Implementation
String toDate([DateFormats format = DateFormats.dateDMY, String? local]) {
if (isToday) {
return 'Today';
} else if (isYesterday) {
return 'Yesterday';
} else {
return DateFormat(format.value, local).format(_v);
}
}