Unverified Commit d0215091 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

migrate generated i18n code to super params (#101065)

parent d9de75aa
...@@ -38,26 +38,16 @@ String generateCupertinoConstructor(LocaleInfo locale) { ...@@ -38,26 +38,16 @@ String generateCupertinoConstructor(LocaleInfo locale) {
/// ///
/// For details on the meaning of the arguments, see [GlobalCupertinoLocalizations]. /// For details on the meaning of the arguments, see [GlobalCupertinoLocalizations].
const CupertinoLocalization${locale.camelCase()}({ const CupertinoLocalization${locale.camelCase()}({
String localeName = '$localeName', super.localeName = '$localeName',
required intl.DateFormat fullYearFormat, required super.fullYearFormat,
required intl.DateFormat dayFormat, required super.dayFormat,
required intl.DateFormat mediumDateFormat, required super.mediumDateFormat,
required intl.DateFormat singleDigitHourFormat, required super.singleDigitHourFormat,
required intl.DateFormat singleDigitMinuteFormat, required super.singleDigitMinuteFormat,
required intl.DateFormat doubleDigitMinuteFormat, required super.doubleDigitMinuteFormat,
required intl.DateFormat singleDigitSecondFormat, required super.singleDigitSecondFormat,
required intl.NumberFormat decimalFormat, required super.decimalFormat,
}) : super( });''';
localeName: localeName,
fullYearFormat: fullYearFormat,
dayFormat: dayFormat,
mediumDateFormat: mediumDateFormat,
singleDigitHourFormat: singleDigitHourFormat,
singleDigitMinuteFormat: singleDigitMinuteFormat,
doubleDigitMinuteFormat: doubleDigitMinuteFormat,
singleDigitSecondFormat: singleDigitSecondFormat,
decimalFormat: decimalFormat,
);''';
} }
const String cupertinoFactoryName = 'getCupertinoTranslation'; const String cupertinoFactoryName = 'getCupertinoTranslation';
......
...@@ -38,28 +38,17 @@ String generateMaterialConstructor(LocaleInfo locale) { ...@@ -38,28 +38,17 @@ String generateMaterialConstructor(LocaleInfo locale) {
/// ///
/// For details on the meaning of the arguments, see [GlobalMaterialLocalizations]. /// For details on the meaning of the arguments, see [GlobalMaterialLocalizations].
const MaterialLocalization${locale.camelCase()}({ const MaterialLocalization${locale.camelCase()}({
String localeName = '$localeName', super.localeName = '$localeName',
required intl.DateFormat fullYearFormat, required super.fullYearFormat,
required intl.DateFormat compactDateFormat, required super.compactDateFormat,
required intl.DateFormat shortDateFormat, required super.shortDateFormat,
required intl.DateFormat mediumDateFormat, required super.mediumDateFormat,
required intl.DateFormat longDateFormat, required super.longDateFormat,
required intl.DateFormat yearMonthFormat, required super.yearMonthFormat,
required intl.DateFormat shortMonthDayFormat, required super.shortMonthDayFormat,
required intl.NumberFormat decimalFormat, required super.decimalFormat,
required intl.NumberFormat twoDigitZeroPaddedFormat, required super.twoDigitZeroPaddedFormat,
}) : super( });''';
localeName: localeName,
fullYearFormat: fullYearFormat,
compactDateFormat: compactDateFormat,
shortDateFormat: shortDateFormat,
mediumDateFormat: mediumDateFormat,
longDateFormat: longDateFormat,
yearMonthFormat: yearMonthFormat,
shortMonthDayFormat: shortMonthDayFormat,
decimalFormat: decimalFormat,
twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat,
);''';
} }
const String materialFactoryName = 'getMaterialTranslation'; const String materialFactoryName = 'getMaterialTranslation';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
name: flutter_localizations name: flutter_localizations
environment: environment:
sdk: ">=2.12.0-0 <3.0.0" sdk: ">=2.17.0-0 <3.0.0"
dependencies: dependencies:
# To update these, use "flutter update-packages --force-upgrade". # To update these, use "flutter update-packages --force-upgrade".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment