format method

String format(
  1. String pattern
)

Format using intl (e.g., 'yyyy-MM-dd' or 'dd/MM/yyyy')

Implementation

String format(String pattern) => DateFormat(pattern).format(this);