time_parts library
Functions
-
clockHour(
int hour24) → int - Clock helpers for an hour and minute picker.
-
formatHhMm(
TimeOfDay time, {bool use24Hour = true}) → String -
14:30in 24-hour mode, or02:30 PMin 12-hour mode. -
hour24FromClock(
int clock, DayPeriod period) → int - Converts a 12-hour clock hour plus AM/PM into an hour from 0 to 23.
-
normalizeTime(
TimeOfDay time, {int minuteInterval = 1}) → TimeOfDay -
Snaps
timeto the nearestminuteInterval. -
tryParseHhMm(
String text) → TimeOfDay? -
Parses
HH:mm, orhh:mm AM/hh:mm PM. Returns null when it is not a real time.