defaultDateTimeFormatter function
Implementation
String defaultDateTimeFormatter(FormeDateTimeType type, DateTime dateTime) {
switch (type) {
case FormeDateTimeType.date:
return '${dateTime.year.toString()}-${dateTime.month.toString().padLeft(2, '0')}-${dateTime.day.toString().padLeft(2, '0')}';
case FormeDateTimeType.dateTime:
return '${dateTime.year.toString()}-${dateTime.month.toString().padLeft(2, '0')}-${dateTime.day.toString().padLeft(2, '0')} ${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}';
}
}