format method

String format({
  1. String dateFormat = DateTimeFormatsVN.dateOnly,
})

Formats the date value according to the specified date format.

Parameters:

  • dateFormat: The format to use for formatting the date (default is DateTimeFormatsVN.dateOnly).

Returns:

  • A formatted date string.

Implementation

String format({
  String dateFormat = DateTimeFormatsVN.dateOnly,
}) {
  if (rawValue == null) {
    return "";
  }
  return value.format(dateFormat: dateFormat);
}