toFormat method

String toFormat({
  1. String format = defaultDateTimeFormat,
})

Return String in supplied format or defaultTimestampFormat = yyyy-MM-dd HH:mm:ss

Implementation

String toFormat({String format = defaultDateTimeFormat}) =>
    DateFormat(format).format(this);