toFormattedDate method

String toFormattedDate({
  1. String outputDateFormat = 'dd-MM-yyyy',
  2. String originFormatDate = 'yyyy-MM-dd',
  3. String originLocale = 'ID',
})

Implementation

String toFormattedDate({
  String outputDateFormat = 'dd-MM-yyyy',
  String originFormatDate = 'yyyy-MM-dd',
  String originLocale = 'ID',
}) {
  DateTime temp = toDateTime(originFormatDate: originFormatDate, locale: originLocale);
  return temp.toFormattedString(outputDateFormat: outputDateFormat);
}