toDate method

DateTime? toDate()

Converts this string to a DateTime, or null if it cannot be parsed.

Implementation

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