toDate method

DateTime? toDate()

Converts the string to a DateTime object. Returns null if parsing fails.

Implementation

DateTime? toDate() => DateTime.tryParse(this);