English display formats for amounts, counts and dates.
Text(DisplayFormat.money(129900))
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clock(
DateTime d, {required bool twentyFourHour}) → String -
The time of day on the clock asked for:
twentyFourHourprints "07:05" (the hour zero-padded, as a 24-hour device prints it), otherwise "7:05 AM" — no leading zero on a twelve-hour clock face. time is the one a screen calls; this is its pure core. -
count(
int value) → String -
A count with thousands separators — steps, followers, a place in a
league:
1240→ "1,240". The sign leads: "-1,240". -
date(
DateTime d) → String - The full day: "28 Aug 2026". Day first, month as a word — a numeric month is the one date shape that means two different days on two sides of the Atlantic.
-
dayMonth(
DateTime d) → String - The day without the year: "28 Aug", for anything inside the current season of use, where the year is noise.
-
isoDate(
DateTime d) → String - The sortable day an audit trail or a property prints: "2026-06-02".
-
money(
int minorUnits, {String symbol = r'$', bool cents = true}) → String -
Currency from MINOR units — cents, pence — so app data carries integers
and never a float that drifts.
cents: falserounds half up to whole units where the decimals are noise (a headline total, a price chip). The sign leads the symbol:-$12.00. -
month(
DateTime d, {bool short = true}) → String -
"Aug", or "August" with
short: false— a month header, a wheel. -
relative(
DateTime d, {required DateTime now}) → String - The human answer to "when": "Today", "Yesterday", "Tomorrow", "3 days ago", "In 2 days", and past a week the plain dayMonth.
-
time(
BuildContext context, DateTime d) → String - The time of day as the reader's device prints it: the 24-hour clock ("07:05", "21:30") when the platform asks for it (MediaQuery.alwaysUse24HourFormatOf), else the 12-hour face ("7:05 AM", "9:30 PM"). It never hard-codes either.
-
weekday(
DateTime d, {bool short = true}) → String -
"Fri", or "Friday" with
short: false.