migrate generated i18n code to super params (#101065)
This commit is contained in:
parent
d9de75aa52
commit
d021509141
@ -38,26 +38,16 @@ String generateCupertinoConstructor(LocaleInfo locale) {
|
||||
///
|
||||
/// For details on the meaning of the arguments, see [GlobalCupertinoLocalizations].
|
||||
const CupertinoLocalization${locale.camelCase()}({
|
||||
String localeName = '$localeName',
|
||||
required intl.DateFormat fullYearFormat,
|
||||
required intl.DateFormat dayFormat,
|
||||
required intl.DateFormat mediumDateFormat,
|
||||
required intl.DateFormat singleDigitHourFormat,
|
||||
required intl.DateFormat singleDigitMinuteFormat,
|
||||
required intl.DateFormat doubleDigitMinuteFormat,
|
||||
required intl.DateFormat singleDigitSecondFormat,
|
||||
required intl.NumberFormat decimalFormat,
|
||||
}) : super(
|
||||
localeName: localeName,
|
||||
fullYearFormat: fullYearFormat,
|
||||
dayFormat: dayFormat,
|
||||
mediumDateFormat: mediumDateFormat,
|
||||
singleDigitHourFormat: singleDigitHourFormat,
|
||||
singleDigitMinuteFormat: singleDigitMinuteFormat,
|
||||
doubleDigitMinuteFormat: doubleDigitMinuteFormat,
|
||||
singleDigitSecondFormat: singleDigitSecondFormat,
|
||||
decimalFormat: decimalFormat,
|
||||
);''';
|
||||
super.localeName = '$localeName',
|
||||
required super.fullYearFormat,
|
||||
required super.dayFormat,
|
||||
required super.mediumDateFormat,
|
||||
required super.singleDigitHourFormat,
|
||||
required super.singleDigitMinuteFormat,
|
||||
required super.doubleDigitMinuteFormat,
|
||||
required super.singleDigitSecondFormat,
|
||||
required super.decimalFormat,
|
||||
});''';
|
||||
}
|
||||
|
||||
const String cupertinoFactoryName = 'getCupertinoTranslation';
|
||||
|
@ -38,28 +38,17 @@ String generateMaterialConstructor(LocaleInfo locale) {
|
||||
///
|
||||
/// For details on the meaning of the arguments, see [GlobalMaterialLocalizations].
|
||||
const MaterialLocalization${locale.camelCase()}({
|
||||
String localeName = '$localeName',
|
||||
required intl.DateFormat fullYearFormat,
|
||||
required intl.DateFormat compactDateFormat,
|
||||
required intl.DateFormat shortDateFormat,
|
||||
required intl.DateFormat mediumDateFormat,
|
||||
required intl.DateFormat longDateFormat,
|
||||
required intl.DateFormat yearMonthFormat,
|
||||
required intl.DateFormat shortMonthDayFormat,
|
||||
required intl.NumberFormat decimalFormat,
|
||||
required intl.NumberFormat twoDigitZeroPaddedFormat,
|
||||
}) : super(
|
||||
localeName: localeName,
|
||||
fullYearFormat: fullYearFormat,
|
||||
compactDateFormat: compactDateFormat,
|
||||
shortDateFormat: shortDateFormat,
|
||||
mediumDateFormat: mediumDateFormat,
|
||||
longDateFormat: longDateFormat,
|
||||
yearMonthFormat: yearMonthFormat,
|
||||
shortMonthDayFormat: shortMonthDayFormat,
|
||||
decimalFormat: decimalFormat,
|
||||
twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat,
|
||||
);''';
|
||||
super.localeName = '$localeName',
|
||||
required super.fullYearFormat,
|
||||
required super.compactDateFormat,
|
||||
required super.shortDateFormat,
|
||||
required super.mediumDateFormat,
|
||||
required super.longDateFormat,
|
||||
required super.yearMonthFormat,
|
||||
required super.shortMonthDayFormat,
|
||||
required super.decimalFormat,
|
||||
required super.twoDigitZeroPaddedFormat,
|
||||
});''';
|
||||
}
|
||||
|
||||
const String materialFactoryName = 'getMaterialTranslation';
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
name: flutter_localizations
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0-0 <3.0.0"
|
||||
sdk: ">=2.17.0-0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
# To update these, use "flutter update-packages --force-upgrade".
|
||||
|
Loading…
x
Reference in New Issue
Block a user