GlobalMaterialLocalizations constructor
const
GlobalMaterialLocalizations({
- required String localeName,
- required DateFormat fullYearFormat,
- required DateFormat compactDateFormat,
- required DateFormat shortDateFormat,
- required DateFormat mediumDateFormat,
- required DateFormat longDateFormat,
- required DateFormat yearMonthFormat,
- required DateFormat shortMonthDayFormat,
- required NumberFormat decimalFormat,
- required NumberFormat twoDigitZeroPaddedFormat,
Initializes an object that defines the material widgets' localized strings
for the given locale.
The arguments are used for further runtime localization of data, specifically for selecting plurals, date and time formatting, and number formatting. They correspond to the following values:
- The string that would be returned by
Intl.canonicalizedLocalefor the locale. - The
DateFormatfor formatYear. - The
DateFormatfor formatShortDate. - The
DateFormatfor formatMediumDate. - The
DateFormatfor formatFullDate. - The
DateFormatfor formatMonthYear. - The
DateFormatfor formatShortMonthDay. - The
NumberFormatfor formatDecimal (also used by formatHour and formatTimeOfDay when timeOfDayFormat doesn't use HourFormat.HH). - The
NumberFormatfor formatHour and the hour part of formatTimeOfDay when timeOfDayFormat uses HourFormat.HH, and for formatMinute and the minute part of formatTimeOfDay.
The narrowWeekdays and firstDayOfWeekIndex properties use the values
from the intl.DateFormat used by formatFullDate.
Implementation
const GlobalMaterialLocalizations({
required this._localeName,
required this._fullYearFormat,
required this._compactDateFormat,
required this._shortDateFormat,
required this._mediumDateFormat,
required this._longDateFormat,
required this._yearMonthFormat,
required this._shortMonthDayFormat,
required this._decimalFormat,
required this._twoDigitZeroPaddedFormat,
});