dateTimeFromString function

DateTime dateTimeFromString(
  1. String string, {
  2. String format = defaultDateTimeFormat,
})

Return DateTime from string using supplied format or defaultDateTimeFormat = 'yyyy-MM-dd HH:mm:ss'`

Implementation

DateTime dateTimeFromString(String string,
        {String format = defaultDateTimeFormat}) =>
    DateFormat(format).parse(string);