DesignLocalizations class abstract
The words a design system says on its own. The behaviours' words: the
names a screen reader hears for a part with no text of its own (a
carousel, a sheet's barrier, a split view's handle) and the messages they
announce (a slide turned, a row moved, the results found), each also a
parameter on its behaviour, which a null leaves to this. And the general
words a look shows or says by itself (Cancel, Close, Today, Next month,
"2 of 5"), under MaterialLocalizations' names where Flutter has the
word, so a look built on any app (MaterialApp, CupertinoApp,
WidgetsApp) has them.
of reads the nearest Localizations' instance, and English (DefaultDesignLocalizations) when there is none, so nothing needs setting up.
ui_core speaks 30 languages (supportedLocales): an app adds delegate
to its localizationsDelegates, beside GlobalMaterialLocalizations'
or its own, and its parts speak the app's language, with its dates, its
digits and its plurals. The words ui_core shares with
MaterialLocalizations (Cancel, Today, Next month, …) are Flutter's own
translations; the rest are ui_core's, awaiting review by native speakers
(the package's README lists them). A locale it does not speak gets
English.
An app that words a message its own way extends
DefaultDesignLocalizations, overriding the words it changes, and adds a
delegate for its subclass, as it does for WidgetsLocalizations.
Extending it, rather than implementing this class, keeps a word added in
a later minor version in English until the app words it.
Localizations(locale: const Locale('en'), delegates: const [DefaultDesignLocalizations.delegate, DefaultWidgetsLocalizations.delegate], child: Builder(builder: (context) => Text(DesignLocalizations.of(context).carouselLabel)))
Constructors
- DesignLocalizations()
-
Abstract const constructor, for subclasses.
const
Properties
- alertDialogLabel → String
-
What a screen reader calls an alert that names itself no other way
(
DesignDialogRoutewithisAlert) ("Alert").no setter - anteMeridiemAbbreviation → String
-
The abbreviation for a time before noon ("AM"), as
MaterialLocalizations' (a time field's day period).no setter - backButtonTooltip → String
-
A button that goes back to the screen before ("Back").
no setter
- bottomSheetLabel → String
-
What a screen reader calls a bottom sheet that names itself no other
way (
DesignBottomSheetRoute.semanticLabel) ("Bottom Sheet").no setter - cancelButtonLabel → String
-
A button that abandons what a dialog, a sheet or a picker was doing
("Cancel").
no setter
- carouselLabel → String
-
What a screen reader calls a carousel (
DesignCarousel.semanticLabel).no setter - chartShowTableLabel → String
-
A chart's screen-reader action that shows its data as a table ("Show
data table").
no setter
- clearButtonTooltip → String
-
A field's button that empties it ("Clear").
no setter
- closeButtonLabel → String
-
A button that closes a dialog, a sheet or a banner ("Close").
no setter
- collapsedIconTapHint → String
-
The hint on a collapsed part's toggle: what a tap does ("Expand").
no setter
- colorAreaLabel → String
-
What a screen reader calls a colour picker's area
(
DesignColorArea.semanticLabel).no setter - commandPaletteBarrierLabel → String
-
The barrier's label behind a shown command palette
(
showDesignCommandPalette'sbarrierLabel).no setter - commandPaletteLabel → String
-
What a screen reader calls the command palette
(
DesignCommandPalette.semanticLabel).no setter - confirmButtonLabel → String
-
A dialog's yes, when the caller names no action of its own
("Confirm").
no setter
- currentDateLabel → String
-
Today, as a calendar or a date picker marks it ("Today").
no setter
- dateFieldDayLabel → String
-
A date field's day segment ("Day").
no setter
- dateFieldDayPlaceholder → String
-
An empty day segment's text ("dd").
no setter
- dateFieldMonthLabel → String
-
A date field's month segment ("Month").
no setter
- dateFieldMonthPlaceholder → String
-
An empty month segment's text ("mm").
no setter
- dateFieldPattern → String
-
A date field's order and the text between its segments (CLDR's yMd:
"M/d/y"; German's "d.M.y"; Japanese's "y/M/d").
no setter
- dateFieldYearLabel → String
-
A date field's year segment ("Year").
no setter
- dateFieldYearPlaceholder → String
-
An empty year segment's text ("yyyy").
no setter
- dateOutOfRangeLabel → String
-
A date outside the field's first and last dates ("Out of range."), as
MaterialLocalizations'.no setter - deleteButtonTooltip → String
-
A button that deletes or removes its item ("Delete").
no setter
- dialogLabel → String
-
What a screen reader calls a dialog that names itself no other way
(
DesignDialogRoute) ("Dialog").no setter - doneButtonLabel → String
-
A button that commits a picker's or a sheet's choice and closes it
("Done").
no setter
- dragHandleLabel → String
-
What a screen reader calls a bottom sheet's drag handle
(
DesignBottomSheetDragHandle) ("Drag handle"). ui_core's own word.no setter - drawerLabel → String
-
What a screen reader calls a side navigation
(
DesignAdaptiveShell's sidebar) ("Navigation menu").no setter - emptyValueLabel → String
-
What a screen reader says for a field or segment with no value
("Empty").
no setter
- expandedIconTapHint → String
-
The hint on an expanded part's toggle: what a tap does ("Collapse").
no setter
- firstDayOfWeek → int
-
The day a week starts on in this locale (DateTime.monday …
DateTime.sunday), which a calendar shows first
(
DesignCalendar.firstWeekday).no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hidePasswordLabel → String
-
The label of a password field's reveal toggle while the text shows
(
DesignPasswordReveal.hideLabel).no setter - keyboardKeyAlt → String
-
The Alt key, in a shortcut's label (Material's
keyboardKeyAlt).no setter - keyboardKeyBackspace → String
-
The Backspace key, in a shortcut's label (Material's
keyboardKeyBackspace).no setter - keyboardKeyControl → String
-
The Control key, in a shortcut's label (Material's
keyboardKeyControl).no setter - keyboardKeyDelete → String
-
The Delete key, in a shortcut's label (Material's
keyboardKeyDelete).no setter - keyboardKeyEnd → String
-
The End key, in a shortcut's label (Material's
keyboardKeyEnd).no setter - keyboardKeyEnter → String
-
The Enter (Return) key, spelled out where its symbol (↵) is not drawn, in a shortcut's label (ui_core's own).
no setter
- keyboardKeyEscape → String
-
The Escape key, in a shortcut's label (Material's
keyboardKeyEscape).no setter - keyboardKeyHome → String
-
The Home key, in a shortcut's label (Material's
keyboardKeyHome).no setter - keyboardKeyInsert → String
-
The Insert key, in a shortcut's label (Material's
keyboardKeyInsert).no setter - keyboardKeyMeta → String
-
The Meta key (Android, Linux), in a shortcut's label (Material's
keyboardKeyMeta).no setter - keyboardKeyMetaMacOs → String
-
The Command key, spelled out, in a shortcut's label (Material's
keyboardKeyMetaMacOs).no setter - keyboardKeyMetaWindows → String
-
The Windows key, in a shortcut's label (Material's
keyboardKeyMetaWindows).no setter - keyboardKeyOption → String
-
The Option key (⌥), spelled out on macOS and iOS: Material has no word for it, in a shortcut's label (ui_core's own).
no setter
- keyboardKeyPageDown → String
-
The Page Down key, in a shortcut's label (Material's
keyboardKeyPageDown).no setter - keyboardKeyPageUp → String
-
The Page Up key, in a shortcut's label (Material's
keyboardKeyPageUp).no setter - keyboardKeyShift → String
-
The Shift key, in a shortcut's label (Material's
keyboardKeyShift).no setter - keyboardKeySpace → String
-
The Space bar, in a shortcut's label (Material's
keyboardKeySpace).no setter - keyboardKeyTab → String
-
The Tab key, in a shortcut's label (ui_core's own).
no setter
- listSeparator → String
-
Joins the parts of a spoken summary (", ").
no setter
- loadingLabel → String
-
What a screen reader calls a spinner or a placeholder while content
loads ("Loading").
no setter
-
What a screen reader calls a menu bar
(
DesignMenuBar.semanticLabel).no setter - modalBarrierDismissLabel → String
-
What a screen reader calls the barrier behind a dialog or a popup,
whose tap dismisses it ("Dismiss").
no setter
- moreButtonTooltip → String
-
A button that opens more actions ("More").
no setter
- nextMonthTooltip → String
-
A calendar's button to the month after ("Next month").
no setter
- nextPageTooltip → String
-
A pager's button to the page after ("Next page").
no setter
- noResultsLabel → String
-
What a search or a filter shows when nothing matches ("No results").
no setter
- okButtonLabel → String
-
A button that accepts a dialog's or a picker's choice ("OK").
no setter
- postMeridiemAbbreviation → String
-
The abbreviation for a time after noon ("PM").
no setter
- previousMonthTooltip → String
-
A calendar's button to the month before ("Previous month").
no setter
- previousPageTooltip → String
-
A pager's button to the page before ("Previous page").
no setter
- rangeSliderEndLabel → String
-
What a screen reader calls a range slider's end thumb
(
DesignRangeSlider.endLabel).no setter - rangeSliderStartLabel → String
-
What a screen reader calls a range slider's start thumb
(
DesignRangeSlider.startLabel).no setter - ratingLabel → String
-
A rating's name when its caller gives none ("Rating").
no setter
- refreshedMessage → String
-
What is announced when a refresh ends
(
DesignPullToRefresh.doneMessage).no setter - refreshingMessage → String
-
What is announced as a refresh starts
(
DesignPullToRefresh.refreshingMessage).no setter - refreshLabel → String
-
The refresh action's label (
DesignPullToRefresh.refreshLabel).no setter - requiredHint → String
-
The hint a required field adds (
DesignField.requiredHint).no setter - retryButtonLabel → String
-
A button that tries again what failed, in an error state ("Try
again").
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchFailedMessage → String
-
What a screen reader hears as a combobox's or a tag input's search fails (DesignCombobox.errorBuilder), in a shortcut's label (ui_core's own).
no setter
- searchFieldLabel → String
-
A search field's label or hint ("Search").
no setter
- selectedLabel → String
-
A mark that an item is chosen, where a look writes it out
("Selected").
no setter
- showLessLabel → String
-
A button that shows less again ("Show less").
no setter
- showMenuTooltip → String
-
A button that opens a menu ("Show menu").
no setter
- showMoreLabel → String
-
A button that shows the rest of a list or a text ("Show more").
no setter
- showPasswordLabel → String
-
The label of a password field's reveal toggle while the text is
hidden (
DesignPasswordReveal.showLabel).no setter - sideSheetBarrierLabel → String
-
The barrier's label behind a side sheet
(
DesignSideSheetRoute.barrierLabel).no setter - splitButtonMenuLabel → String
-
The label of a split button's menu part
(
DesignSplitButton.menuLabel).no setter - splitViewHandleLabel → String
-
What a screen reader calls a split view's handle
(
DesignSplitView.semanticLabel).no setter - tagInputDeleteLabel → String
-
The custom action that removes a tag (
DesignTagInput.deleteLabel).no setter - timeFieldDayPeriodLabel → String
-
A time field's day-period segment ("AM/PM").
no setter
- timeFieldSecondLabel → String
-
A time field's seconds segment ("Second").
no setter
- timePickerHourLabel → String
-
A time field's hour segment, as a screen reader names it ("Hour"), as
MaterialLocalizations'.no setter - timePickerMinuteLabel → String
-
A time field's minute segment ("Minute").
no setter
- toasterRegionLabel → String
-
What a screen reader calls the toasts' region
(
DesignToaster.regionLabel).no setter
Methods
-
carouselSlideLabel(
int index, int count) → String -
What a screen reader calls slide
index(from 0) ofcount, and what it hears when the reader turns to it (DesignCarousel.slideLabel). -
chartExtremesLabel(
String lowest, String highest) → String - A chart's least and greatest values, formatted ("lowest 820, highest 1,640").
-
chartPointCountLabel(
int count) → String - How many data points a chart draws ("12 points").
-
chartPointLabel(
String x, String series, String y) → String -
One data point:
x, itsseries' name and its valuey, formatted ("Mar 2026, Revenue: 1,240"). -
chartRangeLabel(
String from, String to) → String -
A chart's x axis from
fromtoto, both formatted ("Jan to Dec"). -
chartSeriesCountLabel(
int count) → String - How many series a chart draws ("2 series").
-
chartSliceCountLabel(
int count) → String - How many slices a pie chart draws ("4 slices").
-
colorChannelLabel(
DesignColorChannel channel) → String -
What a screen reader calls a colour slider for
channel(DesignColorSlider.semanticLabel). -
commandPaletteResultsMessage(
int count) → String -
What is announced when the palette's results change to
count(DesignCommandPalette.resultsMessage). -
dataTableSortedHint(
DesignSortDirection direction) → String -
A sorted column header's hint (
DesignDataTable.sortedHint). -
formatDecimal(
num value, {int? fractionDigits}) → String -
valuein the reader's digits and separators ("1,240.5"; German's "1.240,5"; Arabic's in Arabic-Indic digits, U+0660 to U+0669, grouped by U+066C with U+066B for the point), withfractionDigitsdecimals, or as many as it has up to three when null. -
formatFullDate(
DateTime date) → String -
A calendar day's full name, read and announced as focus moves to it
(
DesignCalendar.dayLabel). -
formatMonth(
DateTime date) → String -
date's month's name on its own ("November"), as a date field's month segment is read. -
formatMonthYear(
DateTime date) → String -
The name of
date's month and year (DesignCalendar.monthLabel). -
formatPercent(
double fraction, {int fractionDigits = 0}) → String -
fractionas a percentage ("40%"; French's "40 %"). -
formatShortMonth(
DateTime date) → String -
date's month's short name on its own ("Nov"). -
formatShortMonthDay(
DateTime date) → String -
date's month and day, short ("Nov 16"; German's "16. Nov."). -
formatShortWeekday(
int weekday) → String -
The calendar's short name for
weekday(DateTime.monday is 1) (DesignCalendar.weekdayLabel). -
formatTimeOfDay(
DesignTimeOfDay time, {bool alwaysUse24HourFormat = false, bool showSeconds = false}) → String -
timeon the locale's clock ("3:05 PM"; German's "15:05"), on a 24-hour clock whenalwaysUse24HourFormat, with its seconds whenshowSeconds. -
formatYear(
DateTime date) → String -
date's year on its own ("2026"; Japanese's 2026 and its year mark, U+5E74). -
formProblemsMessage(
int count) → String -
What is announced when a form's submit finds
countfields wrong (DesignForm.problemsMessage). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseDecimal(
String text) → double? -
textread as a number the reader wrote, in their digits and separators (or ASCII digits); null when it does not read. -
positionLabel(
int position, int count) → String -
Where an item stands among
count:positionfrom 1 ("2 of 5"), for a step, a page or a slide a look numbers itself. -
ratingValueLabel(
double value, int count) → String -
A rating's value:
valueofcountitems ("3.5 of 5"). -
reorderableListMovedMessage(
String label, int position, int count) → String -
What is announced when the item called
labelmoves toposition(from 1) ofcount(DesignReorderableList.movedMessage). -
selectedRowCountTitle(
int count) → String - How many items are chosen ("3 items selected").
-
tabLabel(
{required int tabIndex, required int tabCount}) → String -
Where a tab stands among
tabCount,tabIndexfrom 1 ("Tab 2 of 5"): a tab's, and a navigation destination's, place as a screen reader reads it. -
timeFieldPattern(
{bool alwaysUse24HourFormat = false, bool showSeconds = false}) → String -
A time field's segments and the text between (CLDR's jm: "h:mm a";
Korean's "a h:mm"; or Hm, "HH:mm", when
alwaysUse24HourFormat), with seconds whenshowSeconds. -
toString(
) → String -
A string representation of this object.
inherited
-
treeLevelHint(
int level, int position, int count) → String -
A tree row's hint:
level(from 1), andposition(from 1) of thecountrows beside it (DesignTree.levelHint).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
forLocale(
Locale locale) → DesignLocalizations -
The words for
locale: its language's (Traditional Chinese forzhwritten in Hant, or in Taiwan, Hong Kong or Macau), else English. -
of(
BuildContext context) → DesignLocalizations -
The words for
context's locale: the nearest Localizations' DesignLocalizations, else English.
Constants
-
delegate
→ const LocalizationsDelegate<
DesignLocalizations> -
Loads the words for an app's locale (forLocale), for its
localizationsDelegates. -
supportedLocales
→ const List<
Locale> - The locales ui_core speaks: English, and 29 more.