enable lint unnecessary_const (#19342)

This commit is contained in:
Alexandre Ardhuin
2018-07-16 21:43:48 +02:00
committed by GitHub
parent d10e46ea65
commit cc1cf13eec
556 changed files with 40458 additions and 40457 deletions

View File

@@ -436,7 +436,7 @@ class GlobalMaterialLocalizations implements MaterialLocalizations {
/// Most internationalized apps will use [GlobalMaterialLocalizations.delegates]
/// as the value of [MaterialApp.localizationsDelegates] to include
/// the localizations for both the material and widget libraries.
static const LocalizationsDelegate<MaterialLocalizations> delegate = const _MaterialLocalizationsDelegate();
static const LocalizationsDelegate<MaterialLocalizations> delegate = _MaterialLocalizationsDelegate();
/// A value for [MaterialApp.localizationsDelegates] that's typically used by
/// internationalized apps.
@@ -457,13 +457,13 @@ class GlobalMaterialLocalizations implements MaterialLocalizations {
/// // ...
/// )
/// ```
static const List<LocalizationsDelegate<dynamic>> delegates = const <LocalizationsDelegate<dynamic>>[
static const List<LocalizationsDelegate<dynamic>> delegates = <LocalizationsDelegate<dynamic>>[
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];
}
const Map<String, TimeOfDayFormat> _icuTimeOfDayToEnum = const <String, TimeOfDayFormat>{
const Map<String, TimeOfDayFormat> _icuTimeOfDayToEnum = <String, TimeOfDayFormat>{
'HH:mm': TimeOfDayFormat.HH_colon_mm,
'HH.mm': TimeOfDayFormat.HH_dot_mm,
"HH 'h' mm": TimeOfDayFormat.frenchCanadian,
@@ -518,7 +518,7 @@ class _MaterialLocalizationsDelegate extends LocalizationsDelegate<MaterialLocal
// Watch out: this list must match the one in the GlobalMaterialLocalizations
// class doc and the list we test, see test/translations_test.dart.
static const List<String> _supportedLanguages = const <String>[
static const List<String> _supportedLanguages = <String>[
'ar', // Arabic
'de', // German
'en', // English

View File

@@ -31,7 +31,7 @@ class GlobalWidgetsLocalizations implements WidgetsLocalizations {
}
// See http://en.wikipedia.org/wiki/Right-to-left
static const List<String> _rtlLanguages = const <String>[
static const List<String> _rtlLanguages = <String>[
'ar', // Arabic
'fa', // Farsi
'he', // Hebrew
@@ -60,7 +60,7 @@ class GlobalWidgetsLocalizations implements WidgetsLocalizations {
/// to create an instance of this class.
///
/// [WidgetsApp] automatically adds this value to [WidgetApp.localizationsDelegates].
static const LocalizationsDelegate<WidgetsLocalizations> delegate = const _WidgetsLocalizationsDelegate();
static const LocalizationsDelegate<WidgetsLocalizations> delegate = _WidgetsLocalizationsDelegate();
}
class _WidgetsLocalizationsDelegate extends LocalizationsDelegate<WidgetsLocalizations> {