toFormat method

String? toFormat(
  1. String format
)

Implementation

String? toFormat(String format) {
  try {
    final parsedDate = DateFormat(format).format(this);
    return parsedDate;
  } catch (exception) {

    return null;
  }
}