parseDate method
Creates a DateTime from this DateFormat.template string.
Implementation
DateTime? parseDate([String template = 'MM/dd/yyyy KK:mm a', String locale = 'en_US']) {
try {
return DateFormat(template, locale).parse(this);
} catch (e) {
return null;
}
}