dateTimeEncoder function

dynamic dateTimeEncoder (
  1. dynamic item
)

Custom encoder for DateTime

Implementation

dynamic dateTimeEncoder(dynamic item) {
  if (item is DateTime) {
    return _parseDateFormat.format(item);
  }
  return item;
}