toDateTime method
Implementation
String toDateTime({String format = 'dd MMM yyyy | hh:mm aaa'}) => length > 0
? DateFormat(format).format(DateTime.tryParse(this)?.toLocal() ??
DateTime.fromMillisecondsSinceEpoch(
int.parse(this),
).toLocal())
: this;