getTimeFormat function

String getTimeFormat({
  1. bool includeSeconds = false,
})

Implementation

String getTimeFormat ({bool includeSeconds = false}) {
  String time;
  if (configuration.millitaryFormat) {
    time = "HH";
  } else {
    time = "hh";
  }

  time += ":mm";

  if (includeSeconds) {
    time += ":ss";
  }

  if (!configuration.millitaryFormat) {
    time += " a";
  }

  return time;
}