enable lint unnecessary_const (#19342)
This commit is contained in:
committed by
GitHub
parent
d10e46ea65
commit
cc1cf13eec
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user