toDateTime property

DateTime? get toDateTime

Parses the string into a DateTime object, returning null if the format is invalid.

Implementation

DateTime? get toDateTime => DateTime.tryParse(this);