toDate method
Implementation
String toDate() => length > 0
? DateFormat('dd MMM yyyy').format(DateTime.tryParse(this)?.toLocal() ??
DateTime.fromMillisecondsSinceEpoch(
int.parse(this),
).toLocal())
: this;
String toDate() => length > 0
? DateFormat('dd MMM yyyy').format(DateTime.tryParse(this)?.toLocal() ??
DateTime.fromMillisecondsSinceEpoch(
int.parse(this),
).toLocal())
: this;