decode method

DateTime decode(
  1. String formattedDateTime
)

Parses formattedDateTime to a DateTime as specified by the pattern.

Parts of a DateTime which are not mentioned in the pattern default to a value of zero for time parts and year, and a value of 1 for day and month.

Throws a FormatException if the formattedDateTime does not match the pattern.

Implementation

DateTime decode(String formattedDateTime) =>
    _decode(formattedDateTime, isUtc, true)!;