formatDate method

String? formatDate({
  1. String? locale,
  2. required String outputFormat,
})

Implementation

String? formatDate({String? locale, required String outputFormat}) {
  if (this == null) return null;
  return DateFormat(outputFormat, locale).format(this!);
}