tryFormat method

String? tryFormat(
  1. String format
)

Formats the DateTime object using the provided pattern and optional locale. respects null dates.

Implementation

String? tryFormat(String format) =>
    isNull ? null : format.dateFormat().format(this!);