stringToDateTime static method
convert date (String to DateTime)
Implementation
static DateTime stringToDateTime({
required String date,
String format = Format.fyyyyMMdd,
}) {
if (_isNullOrEmpty(date)) {
return DateTime.now();
} else {
return DateFormat(format).parse(date);
}
}