formatTime method
Method to build a String representing the Time part of a DateTime
Implementation
String formatTime(DateTime date, bool diffToNow, {String? format}) {
if (!diffToNow) {
format ??= Strings.get("_time_format_", fallbackValue: null);
}
if (format != null) {
return DateFormat(format).format(date.toLocal());
}
return DateFormat(Strings.get("_time_format_", fallbackValue: null))
.format(date.toLocal());
}