buildTickerString function

String buildTickerString(
  1. ClockModel clockModel
)

Builds the actual ticker string e.g. "15:30:45 Mountain View, CA " The string format is as follows BC+D A = Time, with 1 character padding for UI B = X spaces (36 - (a.length + b.length + d.length) C = Right/Phased String, Temp/Location/Date D = 2 Character padding on the right for Icon Space Icons were originally emoji, but imported assets for compat

Implementation

String buildTickerString(ClockModel clockModel) {
  final is24Hours = clockModel.is24HourFormat;

  return (is24Hours ? time24 : time12).chain((timeString) => buildSpacedString(
      " $timeString ", "${buildRightTickerText(clockModel)}  ", 36));
}