forked from firka/flutter
enable prefer_function_declarations_over_variables lint (#77398)
This commit is contained in:
committed by
GitHub
parent
3571882e43
commit
807bb29888
@@ -4,7 +4,7 @@
|
||||
|
||||
import 'localizations_utils.dart';
|
||||
|
||||
HeaderGenerator generateCupertinoHeader = (String regenerateInstructions) {
|
||||
String generateCupertinoHeader(String regenerateInstructions) {
|
||||
return '''
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
@@ -27,11 +27,11 @@ import '../cupertino_localizations.dart';
|
||||
// These classes are constructed by the [getCupertinoTranslation] method at the
|
||||
// bottom of this file, and used by the [_GlobalCupertinoLocalizationsDelegate.load]
|
||||
// method defined in `flutter_localizations/lib/src/cupertino_localizations.dart`.''';
|
||||
};
|
||||
}
|
||||
|
||||
/// Returns the source of the constructor for a GlobalCupertinoLocalizations
|
||||
/// subclass.
|
||||
ConstructorGenerator generateCupertinoConstructor = (LocaleInfo locale) {
|
||||
String generateCupertinoConstructor(LocaleInfo locale) {
|
||||
final String localeName = locale.originalString;
|
||||
return '''
|
||||
/// Create an instance of the translation bundle for ${describeLocale(localeName)}.
|
||||
@@ -58,7 +58,7 @@ ConstructorGenerator generateCupertinoConstructor = (LocaleInfo locale) {
|
||||
singleDigitSecondFormat: singleDigitSecondFormat,
|
||||
decimalFormat: decimalFormat,
|
||||
);''';
|
||||
};
|
||||
}
|
||||
|
||||
const String cupertinoFactoryName = 'getCupertinoTranslation';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import 'localizations_utils.dart';
|
||||
|
||||
HeaderGenerator generateMaterialHeader = (String regenerateInstructions) {
|
||||
String generateMaterialHeader(String regenerateInstructions) {
|
||||
return '''
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
@@ -27,11 +27,11 @@ import '../material_localizations.dart';
|
||||
// These classes are constructed by the [getMaterialTranslation] method at the
|
||||
// bottom of this file, and used by the [_MaterialLocalizationsDelegate.load]
|
||||
// method defined in `flutter_localizations/lib/src/material_localizations.dart`.''';
|
||||
};
|
||||
}
|
||||
|
||||
/// Returns the source of the constructor for a GlobalMaterialLocalizations
|
||||
/// subclass.
|
||||
ConstructorGenerator generateMaterialConstructor = (LocaleInfo locale) {
|
||||
String generateMaterialConstructor(LocaleInfo locale) {
|
||||
final String localeName = locale.originalString;
|
||||
return '''
|
||||
/// Create an instance of the translation bundle for ${describeLocale(localeName)}.
|
||||
@@ -60,7 +60,7 @@ ConstructorGenerator generateMaterialConstructor = (LocaleInfo locale) {
|
||||
decimalFormat: decimalFormat,
|
||||
twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat,
|
||||
);''';
|
||||
};
|
||||
}
|
||||
|
||||
const String materialFactoryName = 'getMaterialTranslation';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user